Get MarginX Outstanding Debts

Lists unpaid MarginX principal and interest, including interest-only debts. Optional exact group filtering, pagination and valuation currency.

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

Returns a paginated list of outstanding MarginX debts across your groups, or for one specified group. A debt remains outstanding while either principal or interest is unpaid: a record with zero principal and positive interest is still returned.

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)YesOutstanding debts in margin 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.

Query parameters

All query parameters are optional.

NameTypeDefaultDescription
pageinteger1One-based page number. Zero, negative or empty values use 1.
pageSizeinteger20Records per page, maximum 1000. Zero, negative or empty values use 20; values above 1000 are rejected.
groupIdstringNo filterExact margin group ID. Omit to query all your groups. If supplied, it must be a positive integer expressed as a string. Empty/whitespace values and group names are invalid. Not a DMA account ID or Portfolio ID.
quoteCurrencystringUSDValuation currency: USD, BTC or USDT. Input is case-insensitive; response values are uppercase. An empty value is invalid.
sortBystringoutstandingPrincipaloutstandingPrincipal, outstandingInterest or currency. Empty uses outstandingPrincipal.
sortDirectionstringDESCASC or DESC. Input is case-insensitive. Empty uses DESC.

Pagination and filtering

  • Pagination uses the same rules as the other MarginX list endpoints. Non-integer or out-of-range integer values return 1002; an integer pageSize above 1000 returns 100400.
  • Records are sorted before pagination. A page beyond the end returns list: [] and retains the matching totalSize. There is no pageNum field.
  • A valid group with no outstanding debts returns success with totalSize: 0 and list: []. An unavailable or deleted group returns an error instead.
  • outstandingPrincipal and outstandingInterest sort the debt quantities, not their valuation fields. Different debt currencies retain their own quantity units.

Response fields

FieldTypeDescription
codeinteger200 means success; any other value indicates an error.
messagestringResult message.
data.pageintegerPage number used.
data.pageSizeintegerPage size used.
data.totalSizeintegerTotal matching debt records, not just the number on this page.
data.listarray of objectsOutstanding debt records on this page.

Debt fields: data.list[]

Quantities, valuations and annual interest rates are decimal strings. IDs are strings. Timestamps are Unix milliseconds.

FieldTypeDescription
debtIdstringDebt identifier used when submitting repayment. Not an order, group or member ID.
groupIdstringMargin group containing this debt.
groupNamestringGroup name.
primeTypestringAccount family of the member carrying the debt: dma or rapidx.
memberIdstringDMA account ID or RapidX Portfolio ID of the member carrying the debt.
venuestringMember's exchange. For RapidX this is the specific Portfolio venue, such as BINANCE or OKX.
currencystringCurrency in which the debt is denominated.
currencyDetailsobject or nullCurrency metadata; see below.
interestRateTypestringFLOATING or FIXED.
termDaysinteger or nullFixed duration in days. null for floating borrowing, not 0.
maturityDateinteger or nullFixed debt's maturity time in Unix milliseconds. null for floating borrowing.
annualInterestRatestringApplicable annual rate as a decimal; for example, "0.14470000" means 14.47% annually. Floating debt uses the current rate; fixed debt uses its fixed rate.
outstandingPrincipalstringUnpaid principal quantity, in currency. Can be "0" while interest is still unpaid.
outstandingIntereststringUnpaid interest quantity, in currency.
quoteCurrencystringCurrency used for valuations: USD, BTC or USDT.
outstandingPrincipalValuestringUnpaid principal valuation, in quoteCurrency.
outstandingInterestValuestringUnpaid interest valuation, in quoteCurrency.

Changing quoteCurrency changes the two ...Value fields, not the principal or interest quantities denominated in currency.

currencyDetails

FieldTypeDescription
idintegerCurrency identifier.
iconUrlstringCurrency icon URL.
currencyNamestringCurrency display name.
slugstringCurrency slug.
referenceAssetIdinteger or nullReference asset identifier.
multipliernumber or nullConversion multiplier to the reference asset.

The response panel includes multiple debt records, including an interest-only balance, plus empty-list and error examples.

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
1002A pagination value cannot be converted to a supported integer.Send integer values; the message identifies the affected field.
100400Invalid group ID, pageSize above 1000, or invalid currency/sort parameters.Use the supported values above. Omit groupId for all groups; do not send an empty value.
-1The requested group is unavailable; observed message: resource unavailable.Check the group ID and whether the group still exists.
2000Signature verification fails.Check the signature and authentication headers.
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.
Query Params
integer
Defaults to 1

One-based page number; non-positive or empty values use 1. Invalid integer format or range returns 1002.

integer
≤ 1000
Defaults to 20

Records per page; non-positive or empty values use 20. More than 1000 returns 100400.

string
enum
Defaults to USD

Valuation currency. Input is case-insensitive. Empty is invalid; omit to use USD.

Allowed:
string
enum
Defaults to outstandingPrincipal

Debt quantity or currency sort field, not valuation. Empty uses outstandingPrincipal.

Allowed:
string
enum
Defaults to DESC

Sort direction. Input is case-insensitive. Empty uses DESC.

Allowed:
string

Exact group ID. Omit for all groups; empty, whitespace and group names are invalid.

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