查詢借貸訂單
覆蓋範圍: 全倉槓桿 (經典帳戶)
HTTP 請求
GET /v5/spot-cross-margin-trade/orders
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
startTime | false | long | 開始時間戳 (毫秒) |
endTime | false | long | 結束時間戳 (毫秒) |
coin | false | string | 幣種名稱 |
status | false | integer | 訂單狀態
|
limit | false | integer | 每頁數量限制. [1 , 500 ]. 默認: 500 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
list | array | Object |
> accountId | string | 帳戶ID |
> coin | string | 幣種名稱 |
> createdTime | number | 借貸訂單創建時間戳 (毫秒) |
> id | string | 借貸交易ID |
> interestAmount | string | 總利息 |
> interestBalance | string | 未還利息 |
> loanAmount | string | 借貸金額 |
> loanBalance | string | 未還本金 |
> remainAmount | string | 未還金額總和=未還利息+未還本金 |
> status | integer | 訂單狀態 1 :未還清, 2 :已還清 |
> type | integer | 訂單類型 1 : 手動借貸, 2 : 自動借貸 |
請求示例
- HTTP
- Python
GET /v5/spot-cross-margin-trade/orders?coin=ETH&limit=1&status=2 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1677754328650
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.spot_margin_trade_normal_get_borrow_order_detail(
coin="ETH",
limit=1,
status=2,
))
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"list": [
{
"accountId": "592335",
"coin": "ETH",
"createdTime": 1677751839000,
"id": "21005",
"interestAmount": "0.0001",
"interestBalance": "0",
"loanAmount": "10",
"loanBalance": "0",
"remainAmount": "0",
"status": 2,
"type": 1
}
]
},
"retExtInfo": {},
"time": 1677754329096
}