Skip to main content

Transfer Assets

API Description

This API allows asset transfers between a Spot account and a Funding account for efficient fund management.

Note: Transfer sssets is only available via RESTful API.

Precautions

None

Authentication

This is a private interface and requires authentication. For details on using the RESTful API, refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

Request Method

POST

Endpoint

/api/v1/private?command=spotWealthTransfer

Frequency limit

The frequency limit for this interface is 1 requests/s per user ID. In addition to this per-interface limit, a global rate limit is also enforced.

For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here

Request Parameters

ParameterMandatoryTypeDescription
accountTypeTrueStringSource account type: WEALTH: Funding account, SPOT: Spot account
targetAccountTypeTrueStringTarget account type: WEALTH: Funding account, SPOT: Spot account
bizTypeTrueStringTransfer direction: WEALTH_TO_SPOT: Funding account to spot account, SPOT_TO_WEALTH: Spot account to funding account.
coinCodeTrueStringBase currency of instrument i.e., BTC
amountTrueBigDecimalTransfer amount in base coins.

Response Parameters

ParameterTypeDescription
dataBooleanTrue
msgStringSuccess

Request Example

The following Python code shows how to transfer coins from funding to spot account.

Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

api_url = "/api/v1/private?command=spotWealthTransfer"
method = "post"
params = {
"accountType" : "WEALTH",
"targetAccountType" : "SPOT",
"bizType" : "WEALTH_TO_SPOT" ,
"coinCode" : "BTC",
"amount" : 0.0001,
}
SpotRestfulPrivate(host, api_url, method, api_key, params, secret_key) # function SpotRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface)

Note: For a complete Java code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

Response Example

The following is an example response returned by the above Python request:

{'code': '200',
'data': True,
'msg': 'SUCCESS',
'success': True,
'failed': False}