Skip to main content

Get Loan Info

Get loan orders information

HTTP Request

GET /spot/v3/private/margin-loan-infos

Request Parameters

ParameterRequiredTypeComments
orderIdfalsestringLoan order id. If not passed, then return all orders, sort by loanTime in descend
startTimefalseintegerStart timestamp (ms)
endTimefalseintegerEnd timestamp (ms)
limitfalseintegerLimit for data size. [1, 100], Default: 10

Response Parameters

ParameterTypeComments
loanInfoarrayObject
> orderIdstringLoan order ID
> orderProductIdstringProduct ID
> parentUidstringUser parent UID
> loanTimestringLoan timestamp, in milliseconds
> loanCoinstringLoan coin
> loanAmountstringLoan amount
> unpaidAmountstringUnpaid principal
> unpaidIntereststringUnpaid interest
> repaidAmountstringRepaid principal
> repaidIntereststringRepaid interest
> interestRatestringDaily interest rate
> statusinteger1:outstanding; 2:paid off
> leveragestringleverage
> supportSpotintegerWhether to support spot. 0:false; 1:true
> supportContractintegerWhether to support contract . 0:false; 1:true
> withdrawLinestringRestrict line for withdrawal
> transferLinestringRestrict line for transfer
> spotBuyLinestringRestrict line for SPOT buy
> spotSellLinestringRestrict line for SPOT sell
> contractOpenLinestringRestrict line for CONTRACT open position
> liquidationLinestringLine for liquidation
> stopLiquidationLinestringLine for stop liquidation
> contractLeveragestringAllowed max leverage of opening contract position
> transferRatiostringAvailable transfer ratio of loan funds
> spotSymbolsarrayThe whitelist of spot trading pairs
> contractSymbolsarrayThe whitelist of contract trading pairs

Request Example

curl --location --request GET 'https://api-testnet.bybit.com/spot/v3/private/margin-loan-infos' \
--header 'X-BAPI-SIGN-TYPE: 2' \
--header 'X-BAPI-API-KEY: XXXXXXXXXXX' \
--header 'X-BAPI-TIMESTAMP: 1669364798602' \
--header 'X-BAPI-RECV-WINDOW: 5000' \
--header 'X-BAPI-SIGN: XXXXX'

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"loanInfo": [
{
"orderId": "1244781478207029504",
"orderProductId": "34",
"parentUid": "999805",
"loanTime": "1663126149000",
"loanCoin": "USDT",
"loanAmount": "500000",
"unpaidAmount": "6351.49614274",
"unpaidInterest": "264.0137162",
"repaidAmount": "493648.50385726",
"repaidInterest": "0",
"interestRate": "0.00027397",
"status": 1,
"leverage": "20",
"supportSpot": 1,
"supportContract": 1,
"withdrawLine": "0.5",
"transferLine": "0.6",
"spotBuyLine": "0.7",
"spotSellLine": "0.8",
"contractOpenLine": "0.9",
"liquidationLine": "0.95",
"stopLiquidationLine": "0.20000000",
"contractLeverage": "3",
"transferRatio": "0.1",
"spotSymbols": [
"DYDXQQTEST001",
"DYDXNEO",
"PMTEST16USDT"
],
"contractSymbols": [
"RAYUSDT",
"API3USDT",
"SUSHIUSDT"
]
}
]
},
"retExtInfo": {},
"time": 1669364798924
}