Skip to main content

Get Borrow Order Detail

Covers: Margin trade (Classic Account)

HTTP Request

GET /v5/spot-cross-margin-trade/orders

Request Parameters

ParameterRequiredTypeComments
startTimefalselongThe start timestamp (ms)
endTimefalselongThe end timestamp (ms)
coinfalsestringCoin name
statusfalseintegerStatus
  • 0(default):get all kinds of status
  • 1:uncleared
  • 2:cleared
limitfalseintegerLimit for data size per page. [1, 500]. Default: 500

Response Parameters

ParameterTypeComments
listarrayObject
> accountIdstringAccount ID
> coinstringCoin name
> createdTimenumberBorrow order created timestamp (ms)
> idstringBorrow order ID
> interestAmountstringTotal interest
> interestBalancestringOutstanding interest
> loanAmountstringPrincipal amount
> loanBalancestringOutstanding principal
> remainAmountstringRemaining debt = interestBalance + loanBalance
> statusintegerStatus 1:uncleared, 2:cleared
> typeintegerOrder Type 1: manual loan, 2: auto loan

Request Example

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

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
}