Get Margin Coin Info
tip
- This endpoint can be queried without api key and secret, then it returns public margin data
- If your uid is bound with OTC loan product, then you can get your private margin data by calling the endpoint with api key and secret
- If your uid is not bound with OTC loan product but api key and secret are also passed, it will return public data only
HTTP Request
GET /v5/ins-loan/ensure-tokens-convert
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
productId | false | string | ProductId. If not passed, then return all product margin coin. For spot, it returns coin that convertRation greater than 0. |
Response Parameters
Parameter | Type | Comments |
---|---|---|
marginToken | array | Object |
> productId | string | Product Id |
> tokenInfo | array | Spot margin coin |
>> token | string | Margin coin |
>> convertRatioList | array | Margin coin convert ratio List |
>>> ladder | string | ladder |
>>> convertRatio | string | Margin coin convert ratio |
Request Example
GET /v5/ins-loan/ensure-tokens HTTP/1.1
Host: api-testnet.bybit.com
Response Example
{
"retCode": 0,
"retMsg": "",
"result": {
"marginToken": [
{
"productId": "81",
"tokenInfo": [
{
"token": "USDT",
"convertRatioList": [
{
"ladder": "0-500",
"convertRatio": "0.95"
},
{
"ladder": "500-1000",
"convertRatio": "0.9"
},
{
"ladder": "1000-2000",
"convertRatio": "0.8"
},
{
"ladder": "2000-4000",
"convertRatio": "0.7"
},
{
"ladder": "4000-99999999999",
"convertRatio": "0.6"
}
]
}
...
]
},
{
"productId": "82",
"tokenInfo": [
...
{
"token": "USDT",
"convertRatioList": [
{
"ladder": "0-1000",
"convertRatio": "0.7"
},
{
"ladder": "1000-2000",
"convertRatio": "0.65"
},
{
"ladder": "2000-99999999999",
"convertRatio": "0.6"
}
]
}
]
},
{
"productId": "84",
"tokenInfo": [
...
{
"token": "BTC",
"convertRatioList": [
{
"ladder": "0-1000",
"convertRatio": "1"
},
{
"ladder": "1000-5000",
"convertRatio": "0.9"
},
{
"ladder": "5000-99999999999",
"convertRatio": "0.55"
}
]
}
]
}
]
},
"retExtInfo": {},
"time": 1683276016497
}