Get Borrow Order Detail
Covers: Margin trade (Classic Account)
HTTP Request
GET /v5/spot-cross-margin-trade/orders
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
startTime | false | long | The start timestamp (ms) |
endTime | false | long | The end timestamp (ms) |
coin | false | string | Coin name |
status | false | integer | Status
|
limit | false | integer | Limit for data size per page. [1 , 500 ]. Default: 500 |
Response Parameters
Parameter | Type | Comments |
---|---|---|
list | array | Object |
> accountId | string | Account ID |
> coin | string | Coin name |
> createdTime | number | Borrow order created timestamp (ms) |
> id | string | Borrow order ID |
> interestAmount | string | Total interest |
> interestBalance | string | Outstanding interest |
> loanAmount | string | Principal amount |
> loanBalance | string | Outstanding principal |
> remainAmount | string | Remaining debt = interestBalance + loanBalance |
> status | integer | Status 1 :uncleared, 2 :cleared |
> type | integer | Order Type 1 : manual loan, 2 : auto loan |
Request Example
- 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,
))
Response Example
{
"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
}