Skip to main content

Get Borrow History

Get interest records, sorted in reverse order of creation time.

Unified account

HTTP Request

GET /v5/account/borrow-history

Request Parameters

ParameterRequiredTypeComments
currencyfalsestringUSDC,USDT,BTC,ETH
startTimefalseintegerThe start timestamp (ms)
  • startTime and endTime are not passed, return 30 days by default
  • Only startTime is passed, return range between startTime and startTime+30 days
  • Only endTime is passed, return range between endTime-30 days and endTime
  • If both are passed, the rule is endTime - startTime <= 30 days
endTimefalseintegerThe end time. timestamp (ms)
limitfalseintegerLimit for data size per page. [1, 50]. Default: 20
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
listarrayObject
> currencystringUSDC,USDT,BTC,ETH
> createdTimeintegerCreated timestamp (ms)
> borrowCoststringInterest
> hourlyBorrowRatestringHourly Borrow Rate
> InterestBearingBorrowSizestringInterest Bearing Borrow Size
> costExemptionstringCost exemption
> borrowAmountstringTotal borrow amount
> unrealisedLossstringUnrealised loss
> freeBorrowedAmountstringThe borrowed amount for interest free
nextPageCursorstringRefer to the cursor request parameter

Request Example

GET /v5/account/borrow-history?currency=BTC&limit=1 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672277745427
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"nextPageCursor": "2671153%3A1%2C2671153%3A1",
"list": [
{
"borrowAmount": "1.06333265702840778",
"costExemption": "0",
"freeBorrowedAmount": "0",
"createdTime": 1697439900204,
"InterestBearingBorrowSize": "1.06333265702840778",
"currency": "BTC",
"unrealisedLoss": "0",
"hourlyBorrowRate": "0.000001216904",
"borrowCost": "0.00000129"
}
]
},
"retExtInfo": {},
"time": 1697442206478
}