Skip to main content

Query Risk Unit Details (USER_DATA)

API Description

Retrieve Institutional loan risk unit details. This endpoint can be accessed using the API key from either the parent or the credit accounts.

Parent Account:

  • If no groupId is provided, you will query all risk units
  • If the groupId is provided, it will only query that single risk unit.

Credit Account:

  • Only the risk unit connected to that credit account will be queried

Other Accounts:

  • LTV details cannot be queried, no results were returned.

HTTP Request

GET /sapi/v1/margin/loan-group/ltv-details

Request Weight

3000(IP)

Request Parameters

NameTypeMandatoryDescription
groupIdLONGNO

Response Example

[ {
"groupId": 1,
"parentEmail": "andrew.kemmer001@test.com",
"creditEmail": "tst20241120@test.com",
"updateTime": 1752137105623,
"ltv": "0.592",
"totalNetEquity": "26.35196946",
"totalMaintenanceMargin": "0.50106177",
"totalLiability": "15.30718771",
"parentAccountFrozenAmount": "8.18753688",
"maxTransferOutAmount": "0",
"maxAllowedBorrowLimit": "16.32397222",
"liabilities": [
{
"assetName": "USDT",
"principal": "15.30718771",
"interest": "0"
} ],
"collateralAccounts": [
{
"email": "collateral001@test.com",
"type": "COLLATERAL",
"wallets": [
{
"accountType": "SPOT",
"netEquity": "5",
"maintainMargin": "0"
},
{
"accountType": "CROSS_MARGIN",
"netEquity": "4.98938226",
"maintainMargin": "0.50106177"
} ] },
{
"email": "collateral003@test.com",
"type": "COLLATERAL",
"wallets": [ {
"accountType": "SPOT",
"netEquity": "5.4284319",
"maintainMargin": "0"
},
{
"accountType": "CROSS_MARGIN",
"netEquity": "0",
"maintainMargin": "0"
} ] },
{
"email": "CREDIT20241120@test.com",
"type": "CREDIT",
"wallets": [ {
"accountType": "SPOT",
"netEquity": "0",
"maintainMargin": "0"
},
{
"accountType": "PORTFOLIO_MARGIN",
"netEquity": "4.93362203",
"maintainMargin": "0"
}] },
{
"email": "collateral004l@test.com",
"type": "COLLATERAL",
"wallets": [ {
"accountType": "SPOT",
"netEquity": "0",
"maintainMargin": "0"
},
{
"accountType": "PORTFOLIO_MARGIN",
"netEquity": "1.00053327",
"maintainMargin": "0"
} ] },
{
"email": "collatera005@test.com",
"type": "COLLATERAL",
"wallets": [ {
"accountType": "SPOT",
"netEquity": "5",
"maintainMargin": "0"
},
{
"accountType": "CROSS_MARGIN",
"netEquity": "0",
"maintainMargin": "0"
} ] } ] }
]

Response detail desc:

ParameterTypeDescription
groupIdLongRisk unit unique identifier
parentEmailStringParent account registered email
creditEmailStringCredit account registered email
updateTimeLongLast update timestamp (milliseconds)
ltvStringLoan-to-Value Ratio

*The LTV ratio is calculated using real-time parameters captured at the moment the API is called.. Depending on market volatility, LTV ratio may fluctuate, It is recommended that users re-query the API endpoint or perform manual LTV recalculation to ensure accuracy.
totalNetEquityString∑Equity in all PM sub account + ( ∑Collateral Value - ∑(Liability + Interest) in all Cross Margin account + Free accepted tokens in spot
totalMaintenanceMarginStringAggregated Maintenance Margin
totalLiabilityStringOutstanding Loan Principal + Outstanding Loan Interest
liabilitiesObject ArrayLiabilities details
→ assetNameStringAsset name
→ principalStringOutstanding loan principal amount
→ interestStringOutstanding loan interest
collateralAccountsObject ArrayRisk group sub account details
→ emailStringCollateral account registered email
→ typeStringCredit or Collateral Account
→ walletsObject ArrayWallet details
→ → accountTypeStringWallet type
→ → netEquityStringNet equity in wallet
→ → maintainMarginStringMaintenance margin required