Get Withdrawal Records
Query withdrawal records.
tip
- Can query by the master UID's api key only
API rate limit: 300 req / min
HTTP Request
GET /private/v1/asset/withdraw/query-record
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
withdrawId | false | string | Withdraw ID |
txid | false | string | Transaction hash ID |
coin | false | string | Coin |
withdrawType | false | integer | Withdraw type. 0 (default): on chain. 1 : off chain. 2 : all |
startTime | false | integer | The start timestamp (s) |
endTime | false | integer | The end timestamp (s) |
pageSize | false | integer | Limit for data size per page. [1 , 50 ]. Default: 20 |
cursor | false | string | Cursor. Used for pagination |
Response Parameters
Parameter | Type | Comments |
---|---|---|
rows | array | Object |
> withdraw_id | string | Withdraw ID |
> tx_id | string | Transaction ID. It returns "" when withdrawal failed, withdrawal cancelled |
> withdraw_type | integer | Withdraw type. 0 : on chain. 1 : off chain |
> coin | string | Coin |
> chain | string | Chain |
> amount | string | Amount |
> withdraw_fee | string | Withdraw fee |
> status | string | Withdraw status |
> to_address | string | To withdrawal address. Internal transfer: Display Zoomex UID, email or phone number |
> user_id | string | UID |
> tag | string | Tag |
> create_time | string | Withdraw created timestamp (s) |
> update_time | string | Withdraw updated timestamp (ms) |
cursor | string | Cursor. Used for pagination |
Request Example
import time
import hmac
import hashlib
import requests
import urllib.parse
def create_request(apiKey, secret, params):
url = 'https://openapi-testnet.zoomex.com/private/v1/asset/withdraw/query-record'
timestamp = int(time.time() * 1000)
recv_window = 1000000
params['api_key'] = apiKey
params['timestamp'] = timestamp
params['recv_window'] = recv_window
ordered_params = '&'.join([f"{key}={params[key]}" for key in sorted(params.keys())])
signature = hmac.new(secret.encode('utf-8'), ordered_params.encode('utf-8'), hashlib.sha256).hexdigest()
params['sign'] = signature
headers = {
'X-BAPI-API-KEY': apiKey,
'X-BAPI-SIGN': signature,
'X-BAPI-TIMESTAMP': str(timestamp),
'X-BAPI-RECV-WINDOW': str(recv_window)
}
query_string = urllib.parse.urlencode(params)
full_url = f"{url}?{query_string}"
response = requests.get(full_url, headers=headers)
print("response status:", response.status_code)
print("response info:", response.json())
print("response time:", response.elapsed.total_seconds())
apiKey = 'your key'
secret = 'your secret'
params = {
"coin": "USDT",
}
create_request(apiKey, secret, params)
Response Example
{
"ret_code": 0,
"ret_msg": "OK",
"ext_code": "",
"result": {
"rows": [
{
"withdraw_id": "123",
"tx_id": "123",
"coin": "USDT",
"chain": "your chain",
"amount": "your amount",
"withdraw_fee": "withdraw fee",
"status": "withdraw status",
"to_address": "to address",
"user_id": "uid",
"tag": "tag",
"create_time": "create time",
"update_time": "update time"
}
],
"cursor": ""
},
"ext_info": null,
"time_now": 1718476267321
}