Skip to main content

Get Internal Transfer Records

Query the internal transfer records between different account types under the same UID.

HTTP Request

GET /private/v1/asset/transfer/list

Request Parameters

ParameterRequiredTypeComments
transferIdfalsestringUUID. Use the UUID used to create the transition
coinfalsestringCoin
statusfalsestringTransfer status
startTimefalseintegerThe start timestamp (s)
endTimefalseintegerThe end timestamp (s)
limitfalseintegerLimit for data size per page. [1, 50]. Default: 10
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
listarrayObject
> transferIdstringTransfer ID
> coinstringTransferred coin
> amountstringTransferred amount
> fromAccountTypestringFrom account type
> toAccountTypestringTo account type
> timestampstringTransfer created timestamp (s)
> statusstringTransfer status
cursorstringRefer to the cursor request parameter

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/transfer/list'
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

{
"retCode": 0,
"retMsg": "success",
"result": {
"list": [
{
"transferId": "selfTransfer_a1091cc7-9364-4b74-8de1-18f02c6f2d5c",
"coin": "USDT",
"amount": "5000",
"fromAccountType": "SPOT",
"toAccountType": "UNIFIED",
"timestamp": "1667283263000",
"status": "SUCCESS"
}
],
"cursor": "eyJtaW5JRCI6MTM1ODQ2OCwibWF4SUQiOjEzNTg0Njh9"
},
"retExtInfo": {},
"time": 1670988271677
}