Master/Sub Account Transfer
API Description
This interface allows the Master Account to transfer assets between itself and its Sub-Accounts. It supports transfers in both directions (Master to Sub, and Sub to Master).
Note: Master/Sub-Account Transfer is only available via RESTful API.
Precautions
- Master Account Only: This endpoint can only be called using the API Key of a Master Account. Sub-accounts cannot initiate transfers.
- Direction Definitions: The
sideparameter defines the direction relative to the Master Account:OUT: Transfer OUT from Master Account to Sub-Account.IN: Transfer IN from Sub-Account to Master Account.
- Asset Account Only: Transfers typically occur between the Asset Accounts (Funding Accounts) of the Master and Sub-users. Ensure funds are in the Asset Account before transferring.
- Sub-to-Sub: Direct transfers between two sub-accounts are not supported. You must transfer to the Master Account first.
Authentication
This is a Private interface. It requires authentication using the Master Account's API Key and Secret Key. For details on signature generation, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
Request Method
POST
Endpoint
/api/v1/private?command=subAccount_transfer
Frequency Limit
The frequency limit for this interface is 3 requests/s per user ID. For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section here.
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| side | true | String | Transfer Direction. OUT: Master to Sub IN: Sub to Master |
| subUid | true | Long | The CoinW UID of the target Sub-Account. |
| currency | true | String | The currency symbol to transfer (e.g., USDT). |
| amount | true | String/Decimal | The amount to transfer. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Request success status. |
| data | Object | Transfer details. |
| -bizNo | String | The unique Order ID / Transaction ID for this transfer. |
Request Example
The following Python code demonstrates transferring 10 USDT from Master to Sub-Account (Side: OUT).
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
api_url = "/api/v1/private?command=subAccount_transfer"
method = "post"
params = {"side": "OUT","subUid": "39*****","currency": "USDT","amount": 10}
SpotRestfulPrivate(host, api_url, method, api_key, params, secret_key)# function SpotRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface)
Response Example
The following is an example response returned by the above request:
{
"code": "200",
"data": {
"bizNo": "******************************"
},
"msg": "SUCCESS",
"success": true,
"failed": false
}