Get Collateral Info
Get the collateral information of the current unified margin account, including loan interest rate, loanable amount, collateral conversion rate, whether it can be mortgaged as margin, etc.
HTTP Request
GET /v5/account/collateral-info
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
currency | false | string | Asset currency of all current collateral |
Response Parameters
Parameter | Type | Comments |
---|---|---|
list | array | Object |
> currency | string | Currency of all current collateral |
> hourlyBorrowRate | string | Hourly borrow rate |
> maxBorrowingAmount | string | Max borrow amount. This value is shared across main-sub UIDs |
> freeBorrowingLimit | string | The maximum limit for interest-free borrowing
|
> freeBorrowAmount | string | The amount of borrowing within your total borrowing amount that is exempt from interest charges |
> borrowAmount | string | Borrow amount |
> freeBorrowingAmount | string | Depreciated field, always return "" , please refer to freeBorrowingLimit |
> availableToBorrow | string | Available amount to borrow. This value is shared across main-sub UIDs |
> borrowable | boolean | Whether currency can be borrowed |
> borrowUsageRate | string | Borrow usage rate: borrowAmount/maxBorrowingAmount, it is an actual value, 0.5 means 50% |
> marginCollateral | boolean | Whether it can be used as a margin collateral currency (platform), true : YES, false : NO |
> collateralSwitch | boolean | Whether the collateral is turned on by user (user), true : ON, false : OFF |
> collateralRatio | string | Collateral ratio |
Request Example
- HTTP
- Python
GET /v5/account/collateral-info?currency=BTC HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672127952719
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_collateral_info(
currency="BTC",
))
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"availableToBorrow": "3",
"freeBorrowingAmount": "",
"freeBorrowAmount": "0",
"maxBorrowingAmount": "3",
"hourlyBorrowRate": "0.00000147",
"borrowUsageRate": "0",
"collateralSwitch": true,
"borrowAmount": "0",
"borrowable": true,
"currency": "BTC",
"marginCollateral": true,
"freeBorrowingLimit": "0",
"collateralRatio": "0.95"
}
]
},
"retExtInfo": {},
"time": 1691565901952
}