Skip to main content

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

  1. Master Account Only: This endpoint can only be called using the API Key of a Master Account. Sub-accounts cannot initiate transfers.
  2. Direction Definitions: The side parameter 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.
  3. 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.
  4. 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

ParameterMandatoryTypeDescription
sidetrueStringTransfer Direction.
OUT: Master to Sub
IN: Sub to Master
subUidtrueLongThe CoinW UID of the target Sub-Account.
currencytrueStringThe currency symbol to transfer (e.g., USDT).
amounttrueString/DecimalThe amount to transfer.

Response Parameters

ParameterTypeDescription
successBooleanRequest success status.
dataObjectTransfer details.
-bizNoStringThe 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
}