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, uppercase only |
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 |
> otherBorrowAmount | string | The sum of borrowing amount for other accounts under the same main account |
> freeBorrowingAmount | string | deprecated 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: sum of main & sub accounts 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
- Node.js
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",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getCollateralInfo('BTC')
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
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",
"otherBorrowAmount": "0",
"marginCollateral": true,
"freeBorrowingLimit": "0",
"collateralRatio": "0.95"
}
]
},
"retExtInfo": {},
"time": 1691565901952
}