Borrow MarginX Funds

Submit a borrowing request to a group member. Main User Level TRANSFER required. LTP covers transaction fees; borrowing interest remains payable.

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

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 typeCan callScope
Main User Level API key (also the Main Portfolio key)YesBorrow for its MarginX groups, selecting a member of the specified group.
Sub-user Level API keyNoNot supported.
Dedicated Sub Portfolio Level API keyNoNot supported, even when that Portfolio is a group member.
Exchange-native API keyNoUse 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

  1. Use Get Group Members to identify a receiving member. A DMA toId is its account ID; a RapidX toId is its Portfolio ID.
  2. 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.
  3. Submit the borrowing request and retain its requestId and any supplied clientOrderId.
  4. 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

NameTypeRequiredDescription
clientOrderIdstringNoCustomer-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.
groupIdstringYesMarginX group ID, not a member or Portfolio ID.
currencystringYesBorrowing currency symbol, such as USDT.
amountstringYesPositive decimal quantity, in currency. Must satisfy the currency's precision, minimum borrowing amount and the group's current borrowing capacity. Keep numbers as strings.
toPrimeTypestringYesdma or rapidx.
toIdstringYesReceiving DMA account ID or RapidX Portfolio ID. The recipient must be a member of groupId; there is no implicit Main Portfolio default.
toAccountTypestringYesDMA wallet type, or the specific RapidX exchange (BINANCE, OKX or another supported member venue). See Account Types.
interestRateTypestringNoFLOATING by default, or FIXED.
termDaysintegerFor FIXEDNumber 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

FieldTypeDescription
codeinteger200 means the request was accepted. Check the subsequent order for execution success.
messagestringResult message.
data.clientOrderIdstring or nullEcho of the supplied customer identifier; null if omitted.
data.requestIdstringSystem identifier for the borrowing order. There is no additional orderId.
data.statusstringOrder status at the time of the receipt, initially NEW. Execution statuses are NEW, PROCESSING, SUCCESS, FAIL.
data.amountstringAccepted requested borrowing quantity, in currency.
data.currencystringBorrowing 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.

CodeMeaning
1001Required request fields are missing; inspect message for their names.
1000Invalid JSON field type, such as an object instead of the amount string.
100400Invalid parameter value, such as zero, negative or non-numeric amount.
2000Signature verification failed.
2003The API key level cannot call this endpoint.
2004The key lacks the required permission; use TRANSFER.
100429Request 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.

Body Params
string
length between 18 and 18
^[A-Za-z0-9]{18}$

Optional customer identifier, exactly 18 ASCII letters or digits; case preserved.

string
required

Margin group ID.

string
required

Borrowing currency, such as USDT.

string
required

Positive borrowing quantity as a decimal string; enforce configured precision, minimum and group capacity.

string
enum
required

Receiving account family; input is case-insensitive.

Allowed:
string
required

Receiving DMA account ID or RapidX Portfolio ID; must be a member of this group.

string
required

Receiving DMA wallet type or specific RapidX exchange, e.g. SPOT or BINANCE.

string
enum
Defaults to FLOATING

Borrowing product. Input is case-insensitive.

Allowed:
integer

Required for FIXED, using an enabled duration in days. Omit for FLOATING.

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