Skip to main content

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​

  1. Master Account Only: This endpoint can only be called using the API Key of a Master Account.
  2. Account Type Codes: The from and to fields in the request and response use specific integer codes to denote the account type:
    • 0: Asset Account (Funding)
    • 1: Spot Account
    • 2: Contract Account (Futures)
    • 3: Sub-Account
    • 4: 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 Common > 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 click here.

Request Parameters​

ParameterMandatoryTypeDescription
currencytrueStringFilter by currency name (e.g., USDT).
fromtrueIntegerSource account type (e.g., 4 for Master).
totrueIntegerDestination account type (e.g., 3 for Sub).
pageNotrueIntegerPage number (Default: 1).
pageSizetrueIntegerNumber of records per page (Default: 10).

Response Parameters​

ParameterTypeDescription
dataArrayList of transfer records.
-currencyStringCurrency name (e.g., USDT).
-createTimeStringTransaction time (Format: YYYY-MM-DD HH:MM:SS).
-amountStringTransfer amount. (Negative values indicate outflow).
-fromIntegerSource Account Type.
0: Asset
1: Spot
2: Contract
3: Sub-Account
4: Master Account
-toIntegerDestination Account Type. (Same enum values as from).
-statusStringTransaction status
1:Success
0:Fail
-ledgerIdStringUnique 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 Common > 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 (Common > 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
}