Queries borrowing, principal-repayment and interest-repayment orders. Includes independent split-repayment records and historical borrowing.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Returns paginated MarginX borrowing, principal-repayment and interest-repayment orders. Use requestId to retrieve one order, or clientOrderId to retrieve the records associated with a customer request.
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 type | Can call | Scope |
|---|---|---|
| Main User Level API key (also the Main Portfolio key) | Yes | Borrowing and repayment orders belonging to the main user. |
| Sub-user Level API key | No | Not supported. |
| Dedicated Sub Portfolio Level API key | No | Not supported. |
| Exchange-native API key | No | Use an LTP Main User Level API key. |
Query parameters
All query parameters are optional. Supplied filters are combined with AND.
| Name | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | One-based page number. Zero, negative or empty values use 1. |
pageSize | integer | 20 | Records per page, maximum 1000. Zero, negative or empty values use 20; values above 1000 are rejected. |
clientOrderId | string | No filter | Exact customer-supplied request identifier. If supplied, exactly 18 ASCII letters or digits; case is preserved. Empty values are invalid. |
requestId | string | No filter | Exact system order identifier. Preserve it as a string. Empty values are invalid. |
groupId | string | No filter | Exact margin group ID, expressed as a positive integer string. Omit for orders across your groups. Empty values and group names are invalid. |
orderType | string | All types | BORROW, REPAY_PRINCIPAL or REPAY_INTEREST. Input is case-insensitive; empty values are invalid. |
sortBy | string | createdAt | createdAt, amount or status. Empty uses createdAt. |
sortDirection | string | DESC | ASC or DESC. Input is case-insensitive. Empty uses DESC. |
There is no currency filter. Amounts are quantities in each order's currency, not converted valuations.
Pagination and filtering
- Non-integer or out-of-range integer pagination values return
1002. An integerpageSizeabove1000returns100400; it is not silently capped. - Sorting applies before pagination. Status sorting follows
NEW,PROCESSING,SUCCESS,FAIL, rather than alphabetical order. - A page beyond the end returns
list: []and retains the matchingtotalSize. There is nopageNumfield. - No matching orders returns a successful empty list. An explicitly requested unavailable or deleted group returns an error; an unfiltered query can still include that group's historical orders.
Understanding borrowing and repayment orders
orderType | from | to |
|---|---|---|
BORROW | {"ltpAccountType":"LTP Lending Service"} for both floating and fixed-term borrowing. | The customer-selected account receiving the funds and taking on the debt. |
REPAY_PRINCIPAL | The customer-selected account actually providing repayment funds. | The member whose principal debt is reduced. |
REPAY_INTEREST | The customer-selected account actually providing repayment funds. | The member whose interest debt is reduced. |
For repayments, to identifies whose debt is reduced, not the destination receiving repayment funds. The funding account and debt-carrying member can be different. memberId always equals to.id.
When a repayment covers both principal and interest, the list contains two independent records. They share the customer's clientOrderId when one was supplied, and each has a distinct requestId, its own amount and execution status. The records can share one transferId for a single transfer covering the total repayment; do not count that transfer twice. Querying by clientOrderId can therefore return more than one record; querying by requestId identifies one record. totalSize counts individual records, not customer requests. There is no separate orderId or nested items array.
Response fields
| Field | Type | Description |
|---|---|---|
code | integer | 200 means success; any other value indicates an error. |
message | string | Result message. |
data.page | integer | Page number used. |
data.pageSize | integer | Page size used. |
data.totalSize | integer | Total matching individual order records. |
data.list | array of objects | Orders on this page. |
Order record: data.list[]
data.list[]IDs and amounts are strings. Timestamps are Unix milliseconds.
| Field | Type | Description |
|---|---|---|
clientOrderId | string or null | Customer-supplied request identifier. null if not supplied or not saved in a historical record. |
requestId | string | System identifier for this individual order record. |
groupId | string | Margin group ID. |
groupName | string | Margin group name. |
orderType | string | BORROW, REPAY_PRINCIPAL or REPAY_INTEREST. |
status | string | Execution status; see below. |
capitalCallStatus | string or null | Capital-call approval and transfer status; see below. null when not applicable. |
currency | string | Currency of the order amount. |
currencyDetails | object or null | Currency metadata; see below. |
amount | string | Borrowed, principal-repayment or interest-repayment quantity for this record. For a split repayment, each record contains only its own portion. Whether execution succeeded is determined by status. |
from | object | Borrowing service endpoint or actual repayment funding account, as described above. |
to | object | Borrowing recipient or member whose debt is reduced, as described above. |
memberId | string | Debt-carrying member ID; always to.id. A DMA account ID or RapidX Portfolio ID. |
debtId | string or null | Associated debt ID for a successful borrowing order, when available. Historical floating-only borrowing predates this ID and may return null even after success. Repayment orders and unsuccessful or processing borrowing orders return null. |
interestRateType | string or null | FLOATING or FIXED when available. Repayment orders and historical borrowing without rate-type metadata may return null. |
termDays | integer or null | Fixed-term duration in days when applicable and available; otherwise null. |
maturityDate | integer or null | Fixed-term maturity time in Unix milliseconds when applicable and available; otherwise null. |
createdAt | integer | Order creation time in Unix milliseconds. |
updatedAt | integer | Last update time in Unix milliseconds. |
transferId | string or null | Associated transfer ID, if one has been generated. |
To obtain repayable debt IDs and current outstanding amounts, use Get Outstanding Debts.
Execution and capital-call statuses
status | Meaning |
|---|---|
NEW | Order created; execution has not started. |
PROCESSING | Execution is in progress. |
SUCCESS | Execution succeeded. |
FAIL | Execution failed. |
capitalCallStatus | Meaning |
|---|---|
null | No capital-call approval applies, including floating borrowing. |
PENDING_APPROVAL | Awaiting capital-call approval. |
APPROVED_PENDING_TRANSFER | Approved; transfer has not been initiated. |
TRANSFER_INITIATED | Transfer has been initiated; this does not itself mean execution succeeded. |
REJECTED | Capital-call approval was rejected. |
Capital-call status and order execution status are separate. Check status for the execution outcome.
from and to account fields
from and to account fieldsThe borrowing service endpoint contains only ltpAccountType: "LTP Lending Service". Customer accounts use the following fields:
| Field | Type | Description |
|---|---|---|
ltpAccountType | string | TRADING. |
primeType | string | dma or rapidx. |
id | string | DMA account ID or RapidX Portfolio ID. |
venue | string | Exchange; for RapidX, its specific Portfolio venue. |
accountType | string or null | DMA wallet type or RapidX exchange. A repayment's debt-carrying DMA member may have null because no specific destination wallet is identified. |
See Account Types for current enums. Historical orders can retain older values such as Spot, Trading, Margin-PM, USDT-M, Unified Account or Funding.
currencyDetails
currencyDetails| Field | Type | Description |
|---|---|---|
id | integer | Currency identifier. |
iconUrl | string | Currency icon URL. |
currencyName | string | Currency display name. |
slug | string | Currency slug. |
referenceAssetId | integer or null | Reference asset identifier. |
multiplier | number or null | Conversion multiplier to the reference asset. |
The response panel includes borrowing, split-repayment, historical and empty-list examples.
Error codes
Errors can return HTTP 200 with a non-success JSON code. Check both HTTP status and JSON code. See Error Codes for shared errors.
| Code | When it occurs | What to do |
|---|---|---|
1002 | A pagination value cannot be converted to a supported integer. | Send integer values; the message identifies the affected field. |
100400 | Invalid filter, empty required filter value, invalid sorting parameter, or pageSize above 1000. | Use the supported values. Omit optional filters instead of sending empty strings. |
-1 | An explicitly requested group is unavailable. Observed message: Group unavailable. | Check the group ID and whether it remains available. |
2000 | Signature verification fails. | Check the signature and authentication headers. |
2003 | The calling API key level is not allowed. | Use a Main User Level API key. |
2004 | The key lacks a required permission. | Use a key with READ permission. |
100429 | Rate limit exceeded. | Reduce the request rate. |
