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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| accountType | True | String | Source account type: WEALTH: Funding account, SPOT: Spot account |
| targetAccountType | True | String | Target account type: WEALTH: Funding account, SPOT: Spot account |
| bizType | True | String | Transfer direction: WEALTH_TO_SPOT: Funding account to spot account, SPOT_TO_WEALTH: Spot account to funding account. |
| coinCode | True | String | Base currency of instrument i.e., BTC |
| amount | True | BigDecimal | Transfer amount in base coins. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| data | Boolean | True |
| msg | String | Success |
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}