Get Transfer History
API Description
This interface allows the Master Account to query the historical records of asset transfers. This includes transfers between Master and Sub-accounts, as well as internal transfers between different account types (e.g., Asset to Spot).
Note: Query Transfer History is only available via RESTful API.
Precautions
- Master Account Only: This endpoint can only be called using the API Key of a Master Account.
- Account Type Codes: The
fromandtofields in the request and response use specific integer codes to denote the account type:0: Asset Account (Funding)1: Spot Account2: Contract Account (Futures)3: Sub-Account4: Master Account
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=returnTransferHistory
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 |
|---|---|---|---|
| currency | true | String | Filter by currency name (e.g., USDT). |
| from | true | Integer | Source account type (e.g., 4 for Master). |
| to | true | Integer | Destination account type (e.g., 3 for Sub). |
| pageNo | true | Integer | Page number (Default: 1). |
| pageSize | true | Integer | Number of records per page (Default: 10). |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| data | Array | List of transfer records. |
| -currency | String | Currency name (e.g., USDT). |
| -createTime | String | Transaction time (Format: YYYY-MM-DD HH:MM:SS). |
| -amount | String | Transfer amount. (Negative values indicate outflow). |
| -from | Integer | Source Account Type. 0: Asset 1: Spot 2: Contract 3: Sub-Account 4: Master Account |
| -to | Integer | Destination Account Type. (Same enum values as from). |
| -status | String | Transaction status 1:Success 0:Fail |
| -ledgerId | String | Unique Transaction ID. |
Request Example
The following Python code queries the transfer history from the Master Account (4) to a Sub-Account (3).
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
api_url = "/api/v1/private?command=returnTransferHistory"
method = "post"
params = {
"currency": "USDT",
"from": 4, # Main Account
"to": 3, # Sub Account
"pageNo": 1,
"pageSize": 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": [
{
"currency": "USDT",
"createTime": "2025-12-17 17:32:20",
"amount": "-10",
"from": 4,
"to": 3,
"status": "1",
"ledgerId": "**************************out"
},
{
"currency": "USDT",
"createTime": "2025-12-17 17:18:49",
"amount": "-10",
"from": 4,
"to": 3,
"status": "1",
"ledgerId": "**************************out"
}
],
"msg": "SUCCESS",
"success": true,
"failed": false
}