查詢提現紀錄
提示
- 僅支持母帳號的API key
API頻率: 300次/分
HTTP 請求
GET /private/v1/asset/withdraw/query-record
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
withdrawId | false | string | 提現Id |
txid | false | string | 交易哈希ID |
coin | false | string | 幣種 |
withdrawType | false | integer | 提現類型. 0 (默認): 鏈上提幣. 1 : 平台內部轉帳. 2 : 所有方式 |
startTime | false | integer | 開始時間戳 (秒) |
endTime | false | integer | 結束時間戳 (秒) |
pageSize | false | integer | 每頁數量限制. [1 , 50 ]. 默認: 20 |
cursor | false | string | 游標,用於翻頁 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
rows | array | Object |
> withdraw_id | string | 提現Id |
> tx_id | string | 交易Id,提現失敗/提現撤銷:為空 |
> withdraw_type | integer | 提現類型. 0 : 鏈上提幣. 1 : 內部轉帳 |
> coin | string | 幣種 |
> chain | string | 鏈名 |
> amount | string | 提幣金額 |
> withdraw_fee | string | 提幣手續費 |
> status | string | 提幣狀態 |
> to_address | string | 提現目標地址. 內部轉帳:展示Zoomex UID,郵箱或手機號 |
> user_id | string | UID |
> tag | string | 標籤 |
> create_time | string | 提現創建時間戳 (秒) |
> update_time | string | 提現更新時間戳 (毫秒) |
> cursor | string | 游標,用於翻頁 |
請求示例
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_code)
print("响应信息:", response.json())
print("响应时间:", response.elapsed.total_seconds())
apiKey = 'your key'
secret = 'your secret'
params = {
"coin": "USDT",
}
create_request(apiKey, secret, params)
響應示例
{
"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
}