查詢萬能劃轉紀錄
提示
- 母子帳號的api key都支持調用
- 母帳號的api key需擁有"母子帳戶劃轉"(SubMemberTransfer)權限
- 子帳號的api key需擁有"母子帳戶劃轉"(SubMemberTransferList)權限
信息
當startTime
& endTime
都不傳入時, API默認返回30天的數據
HTTP 請求
GET /v5/asset/transfer/query-universal-transfer-list
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
transferId | false | string | UUID. 使用創建萬能劃轉時的UUID |
coin | false | string | 幣種 |
status | false | string | 劃轉狀態. SUCCESS ,FAILED ,PENDING |
startTime | false | integer | 開始時間戳 (毫秒) 注意: 實際查詢時是秒級維度生效 |
endTime | false | integer | 結束時間戳 (毫秒) 注意: 實際查詢時是秒級維度生效 |
limit | false | integer | 每頁數量限制. [1 , 50 ]. 默認: 20 |
cursor | false | string | 游標,用於翻頁 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
list | array | Object |
> transferId | string | 劃轉Id |
> coin | string | 劃轉幣種 |
> amount | string | 劃轉金額 |
> fromMemberId | string | 劃出UID |
> toMemberId | string | 劃入UID |
> fromAccountType | string | 劃出賬戶類型 |
> toAccountType | string | 劃入賬戶類型 |
> timestamp | string | 劃轉創建時間戳 (毫秒) |
> status | string | 劃轉狀態 |
nextPageCursor | string | 游標,用於翻頁 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/asset/transfer/query-universal-transfer-list?limit=1&cursor=eyJtaW5JRCI6MTc5NjU3OCwibWF4SUQiOjE3OTY1Nzh9 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN-TYPE: 2
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672190762800
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_universal_transfer_records(
limit=1,
cursor="eyJtaW5JRCI6MTc5NjU3OCwibWF4SUQiOjE3OTY1Nzh9",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getUniversalTransferRecords({
limit: 1,
cursor: 'eyJtaW5JRCI6MTc5NjU3OCwibWF4SUQiOjE3OTY1Nzh9',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"list": [
{
"transferId": "universalTransfer_4c3cfe2f-85cb-11ed-ac09-9e37823c81cd_533285",
"coin": "USDC",
"amount": "1000",
"timestamp": "1672134373000",
"status": "SUCCESS",
"fromAccountType": "UNIFIED",
"toAccountType": "UNIFIED",
"fromMemberId": "533285",
"toMemberId": "592324"
}
],
"nextPageCursor": "eyJtaW5JRCI6MTc4OTYwNSwibWF4SUQiOjE3ODk2MDV9"
},
"retExtInfo": {},
"time": 1672190763079
}