Transfer Assets
Description
Transfer funds between the user's spot account and futures account. Usage notes:
- When returning
10030, request timeouts, or system exceptions occur, you may use the originalcustom_order_idquery result, or alternatively, use the original order number and identical business parameters to re-initiate a transfer. The interface supports idempotent retry of original orders. Retries for the same order will not result in duplicate transfers. - On retry, keep
custom_order_id,type,asset,amountunchanged, and regenerate the authentication timestamp, nonce, and signature. Do not reuse the order ID for retrying the same transfer. Otherwise, it will be treated as a new order. Retrying an original order means resending the same business request, not blindly replaying the original HTTP request with the old signature.
HTTP Request
- POST
/api/v3/asset/futures/transfer - Supported Products:
spot/linear - Rate Limit: 10 requests per second per UID
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Transfer direction: SPOT_FUTURE indicates spot-to-futures transfer; FUTURE_SPOT indicates futures-to-spot transfer. |
asset | string | Yes | Transfer asset, e.g. usdt. Use lowercase asset code. |
amount | string | Yes | Transfer amount, use decimal string format, must be greater than 0. Integers up to 20 digits, decimals up to 18 digits; |
custom_order_id | string | Yes | Custom order number defined by the user, required, up to 128 characters, used for idempotency control. Must remain unchanged when retrying a transfer. |
Response Parameters
Response outer field:
| Field | Type | Description |
|---|---|---|
code | integer | Business status code. 200 indicates transfer success; 10030 indicates processing or result not yet determined |
message | string | Result description. |
data | object (on success) | On success, a transfer order ID is returned. On failure or processing, an empty business message is returned without valid order details. |
data field:
| Field | Type | Description |
|---|---|---|
custom_order_id | string | User-defined order number |
transfer_id | string | System transfer order ID, used to query transfer status and reconcile accounts. |
Common business status codes:
| Status Code | Description | Recommendation for handling |
|---|---|---|
| 200 | transfer successful | Save order ID for query and reconciliation. |
| 10003 | Invalid parameters | Validate required fields, transfer direction, amount, and order number |
| 10016 | Insufficient account balance | Check the available balance of the source account. |
| 10002 | invalid account | Check if the account is available. |
| 10701 | invalid currency | Check asset code. |
| 30001 | transfer failed | Query order confirmation status |
| 10030 | Processing or result not yet determined | Query using the original order ID, or perform idempotent retries with the original order ID and business parameters unchanged. Do not treat this as a failure. |
| 10000 | System error | Use the original order number to query results, or maintain the original order number and business parameters unchanged for idempotent retries. |
Request Example
POST /api/v3/asset/futures/transfer HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-api-key: ${API_KEY}
ex-timestamp: ${EX_TIMESTAMP}
ex-nonce: ${EX_NONCE}
ex-signature: ${EX_SIGNATURE}
ex-client-type: API
{"type":"SPOT_FUTURE","asset":"usdt","amount":"10.5","custom_order_id":"my_transfer_001"}
Response Example
{
"code": 200,
"message": "Success",
"data": {
"custom_order_id": "my_transfer_001",
"transfer_id": "BIZ20260423195300001"
}
}