Get Deposit & Withdrawal Histroy
API Description
This interface allows users to retrieve a summary of deposit and withdrawal records for the specified instruments, including amount, status, chain, and transfer method.
Note: Deposit & withdrawal histroy 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=returnDepositsWithdrawals
Frequency limit
The frequency limit for this interface is 3 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 |
|---|---|---|---|
| symbol | True | String | Trading instrument(s). Multiple tranding instruments allowed, separated by commas. Example: "BTC,ETH" Note: Max 20 instruments per request |
| depositNumber | False | String | Unique ID of recharge record |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| amount | String | Quantity |
| chain | String | Blockchain Name |
| side | Integer | 1: Deposit, 2: Withdrawal |
| depositNumber | String | Unique ID of recharge record |
| address | String | Deposit and withdrawal address |
| txid | String | Transaction hash |
| memo | String | Memo address |
| currency | String | Currency Name |
| time | Long | Deposit and withdrawal time |
| confirmations | String | Number of confirmations |
| status | String | Status: 1: Waiting for withdrawal 3: Withdrawal successful 4: User withdrawal |
| dest | String | Withdrawal method: on_chain: On-chain withdrawal internal_transfer: Internal transfer |
| fromAddress | String | UID of the withdrawal initiator |
| toAddress | String | Recipient information. If "dest" is "on_chain", this parameter is an on-chain address. If "dest" is "internal_transfer", this parameter is a UID, email address, or phone number. |
Request Example
The following Python code shows how to get the deposit and withdrawal records.
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
api_url = "/api/v1/private?command=returnDepositsWithdrawals"
method = "post"
params = {"symbol": "BTC,USDT",
# "depositNumber" : ""
}
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":[
{
"amount": "5.00000000",
"chain": "TRC20",
"side": 2,
"depositNumber": *******,
"address": "**********************",
"txid": null,
"memo": "备注123",
"currency": "USDT",
"time": 1763308897000,
"confirmations": 0,
"status": 4
},
{
"amount": "0.00100000",
"chain": "",
"side": 1,
"depositNumber": *******,
"address": "*********",
"txid": "*****************",
"memo": null,
"currency": "BTC",
"time": 1762166355000,
"confirmations": 0,
"status": 4
},
],
"msg":"SUCCESS"
}