Get Margin Group Details

Returns asset, debt, borrowing-capacity and risk data for one MarginX group, without a member list.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Returns the asset valuation, outstanding debt, borrowing capacity and risk metrics of one MarginX margin group. Members are queried separately; this response does not include a member list.

Rate limit: 10 requests per minute per API key.

API key access

Requires a signed LTP Open API request with READ permission. See Authentication.

API key typeCan callScope
Main User Level API key (also the Main Portfolio key)YesMargin groups belonging to the main user.
Sub-user Level API keyNoNot supported.
Dedicated Sub Portfolio Level API keyNoNot supported.
Exchange-native API keyNoUse an LTP Main User Level API key.

Parameters

NameInTypeRequiredDescription
groupIdPathstringYesMargin group ID returned by Get Margin Groups or Create Margin Group. Not a DMA account ID or Portfolio ID. Must be a positive integer expressed as a string.
quoteCurrencyQuerystringNoValuation currency: USD, BTC or USDT. Defaults to USD. Input is case-insensitive; response values are uppercase. An empty value is invalid.

Members with zero assets

A group always has at least one member. When its members have zero assets, group asset/risk data may be unavailable, and this endpoint may return code: -1 with message: "MarginX group data unavailable". This does not mean the group has no members or was deleted. The group list and member query can still return the group and its members.

Response fields

All monetary fields below are decimal strings valued in quoteCurrency. They are valuations, not quantities of an individual asset. Ratios are decimal strings, not percentage-formatted text. createdAt is a Unix timestamp in milliseconds.

FieldTypeDescription
codeinteger200 means success; any other value indicates an error.
messagestringResult message.
data.idstringMargin group ID.
data.namestringGroup name.
data.quoteCurrencystringCurrency used for monetary valuations: USD, BTC or USDT.
data.totalValuestringTotal group asset valuation.
data.totalDebtstringTotal outstanding principal and interest valuation.
data.maxAvailableBorrowstringAvailable borrowing capacity expressed in the valuation currency, not the quantity of a specific borrowable asset.
data.borrowedstringOutstanding principal valuation.
data.intereststringOutstanding interest valuation.
data.adjustedEquitystringGroup equity after collateral adjustments.
data.imstringInitial margin requirement, in the valuation currency.
data.mmstringMaintenance margin requirement, in the valuation currency.
data.imrstring or nullInitial margin ratio (IMR). null when unavailable.
data.mmrstring or nullMaintenance margin ratio (MMR). null when unavailable.
data.ltvstring or nullLoan-to-value ratio (LTV). null when unavailable.
data.ltvLimitstringGroup LTV limit; for example, "0.7" means 70%.
data.riskStatusstringGroup risk status; see below.
data.createdAtintegerGroup creation time, Unix timestamp in milliseconds.

Risk status

ValueMeaning
MMR_NORMALNormal.
MMR_LOW_RISKLow risk.
MMR_MEDIUM_RISKMedium risk.
MMR_HIGH_RISKHigh risk.
MMR_LIQUIDATEDLiquidated.

Success and error examples are available in the response panel.

Error codes

Errors can return HTTP 200 with a non-success JSON code. Check code, not HTTP status alone. See Error Codes for shared errors.

CodeWhen it occursWhat to do
100400Invalid group ID (zero, negative, non-integer or out of range), or an empty/unsupported quoteCurrency.Use a valid group ID and supported currency.
-1The group is unavailable, or no group asset/risk data is available. Observed messages: Group unavailable and MarginX group data unavailable.Check the ID in the group list. A group whose members have zero assets may have no detail data; this does not mean it has no members. If data is expected but remains unavailable, contact support.
2000Signature verification fails.Check the authentication headers and signature.
2003The calling API key level is not allowed.Use a Main User Level API key.
2004The key lacks a required permission.Use a key with READ permission.
100429Rate limit exceeded.Reduce the request rate.
Path Params
string
required

Margin group ID, not a DMA account or Portfolio ID. Positive integer expressed as a string.

Query Params
string
enum
Defaults to USD

Valuation currency. Case-insensitive input; empty is invalid.

Allowed:
Headers
string
required

Current Unix timestamp in seconds, also used in the signature.

string
required

HMAC-SHA256 hex signature; see Authentication.

string
required

Current Unix timestamp in microseconds.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json