查詢劃轉紀錄 (單帳號內)
獲取單帳號內的劃轉紀錄
信息
當startTime
& endTime
都不傳入時, API默認返回30天的數據
HTTP 請求
GET /v5/asset/transfer/query-inter-transfer-list
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
transferId | false | string | UUID. 使用創建劃轉時用的UUID |
coin | false | string | 幣種 |
status | false | string | 劃轉狀態 |
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 | 劃轉金額 |
> fromAccountType | string | 劃出賬戶類型 |
> toAccountType | string | 劃入賬戶類型 |
> timestamp | string | 劃轉創建時間戳 (毫秒) |
> status | string | 劃轉狀態 |
nextPageCursor | string | 游標,用於翻頁 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/asset/transfer/inter-transfer-list-query?coin=USDT&limit=1 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1670988271299
X-BAPI-RECV-WINDOW: 50000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_internal_transfer_records(
coin="USDT",
limit=1,
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getInternalTransferRecords({
coin: 'USDT',
limit: 1,
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"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"
}
],
"nextPageCursor": "eyJtaW5JRCI6MTM1ODQ2OCwibWF4SUQiOjEzNTg0Njh9"
},
"retExtInfo": {},
"time": 1670988271677
}