Submit a borrowing request to a group member. Main User Level TRANSFER required. LTP covers transaction fees; borrowing interest remains payable.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Submits a borrowing request for a MarginX group and pays the funds into a selected group member's DMA wallet or RapidX Portfolio exchange account. A successful submission returns a system requestId; it does not mean the funds have arrived.
Rate limit: 10 requests per minute per API key.
LTP covers any transaction fees incurred during borrowing and repayment. You do not pay these fees. Borrowing interest is charged separately under the applicable terms.
API key access
Requires a signed request with TRANSFER permission. See Authentication.
| API key type | Can call | Scope |
|---|---|---|
| Main User Level API key (also the Main Portfolio key) | Yes | Borrow for its MarginX groups, selecting a member of the specified group. |
| Sub-user Level API key | No | Not supported. |
| Dedicated Sub Portfolio Level API key | No | Not supported, even when that Portfolio is a group member. |
| Exchange-native API key | No | Use an LTP Main User Level API key. |
READ alone does not authorize borrowing. There is no separate lending-write permission: borrowing uses TRANSFER.
Before borrowing
- Use Get Group Members to identify a receiving member. A DMA
toIdis its account ID; a RapidXtoIdis its Portfolio ID. - Query Get Group Borrowable Assets with the group and currency. Check amount precision, minimum borrowing quantity, group capacity, and the enabled rate terms. Group borrowing capacity is shared; this query does not require a receiving member.
- Submit the borrowing request and retain its
requestIdand any suppliedclientOrderId. - Query Get Borrowing and Repayment Orders for execution status. Use Get Outstanding Debts for the debt and its currently applicable interest rate.
JSON body parameters
| Name | Type | Required | Description |
|---|---|---|---|
clientOrderId | string | No | Customer-supplied request identifier. When supplied, exactly 18 ASCII letters or digits, case preserved; numeric strings are recommended. Omit if unused; the server does not generate this customer field. |
groupId | string | Yes | MarginX group ID, not a member or Portfolio ID. |
currency | string | Yes | Borrowing currency symbol, such as USDT. |
amount | string | Yes | Positive decimal quantity, in currency. Must satisfy the currency's precision, minimum borrowing amount and the group's current borrowing capacity. Keep numbers as strings. |
toPrimeType | string | Yes | dma or rapidx. |
toId | string | Yes | Receiving DMA account ID or RapidX Portfolio ID. The recipient must be a member of groupId; there is no implicit Main Portfolio default. |
toAccountType | string | Yes | DMA wallet type, or the specific RapidX exchange (BINANCE, OKX or another supported member venue). See Account Types. |
interestRateType | string | No | FLOATING by default, or FIXED. |
termDays | integer | For FIXED | Number of days, such as 30, 60 or 180. Select an enabled term returned for this currency by the group-borrowable endpoint. Omit for FLOATING; do not use 0 to represent floating borrowing. |
Enum input is case-insensitive. Names and IDs, including clientOrderId, are not case-normalized. Do not send a system requestId; the server generates it after accepting the request.
For example, toPrimeType=dma, toId=51001, toAccountType=SPOT chooses a DMA Spot wallet. toPrimeType=rapidx, toId=71001, toAccountType=BINANCE chooses the Binance side of a RapidX Portfolio; the API key still belongs to the Main User.
Floating and fixed-term execution
For floating borrowing, compare the amount with the group endpoint's floating.poolAvailableAmount. Sufficient pool availability indicates automatic-disbursement capacity at the time of the query, not completed payment. An amount above that availability may require manual handling; it is not itself proof that the group's borrowing limit is insufficient.
For fixed-term borrowing, provide an enabled termDays. Capital-call approval, when applicable, is shown in the order's capitalCallStatus; it is separate from execution status. The fixed rate is determined at disbursement. A member-specific rate adjustment can make the debt's currently applicable rate type differ from the borrowing order's selected product; consult the outstanding-debt record for current debt terms.
Response fields
| Field | Type | Description |
|---|---|---|
code | integer | 200 means the request was accepted. Check the subsequent order for execution success. |
message | string | Result message. |
data.clientOrderId | string or null | Echo of the supplied customer identifier; null if omitted. |
data.requestId | string | System identifier for the borrowing order. There is no additional orderId. |
data.status | string | Order status at the time of the receipt, initially NEW. Execution statuses are NEW, PROCESSING, SUCCESS, FAIL. |
data.amount | string | Accepted requested borrowing quantity, in currency. |
data.currency | string | Borrowing currency. |
For both borrowing products, the history record's from is {"ltpAccountType":"LTP Lending Service"}. Its to is the actual receiving member and wallet; memberId=to.id. A successful order can identify the debt through debtId. Historical floating-only records may lack that ID. Borrowing into an existing member/currency debt can increase an existing debt rather than create a new debt ID per request.
Tracking and retries
HTTP 200 and JSON code=200 do not establish disbursement success. Query the order until its execution status is final. A returned transferId identifies the associated funds movement; order, transfer and debt IDs are different identifiers.
If submission times out or the connection is interrupted, query by the original clientOrderId before submitting again. Do not generate a fresh customer identifier and blindly repeat a request with an unknown outcome. Keep the original identifiers for reconciliation rather than treating a timeout as a rejected borrowing request.
Error codes
Check both HTTP status and JSON code. Common errors are listed in Error Codes. Field-validation messages can identify multiple invalid fields; do not hard-code an exact message string.
| Code | Meaning |
|---|---|
1001 | Required request fields are missing; inspect message for their names. |
1000 | Invalid JSON field type, such as an object instead of the amount string. |
100400 | Invalid parameter value, such as zero, negative or non-numeric amount. |
2000 | Signature verification failed. |
2003 | The API key level cannot call this endpoint. |
2004 | The key lacks the required permission; use TRANSFER. |
100429 | Request rate exceeded the limit. |
A submitted order can subsequently fail even after a successful receipt. The order-history response currently does not include a failure reason; retain its requestId for support investigation.
