查詢保證金幣種信息
提示
- 該接口在不傳入api key和secret進行鑒權時, 則返回公共數據
- 該接口在傳入api key和secret進行鑒權時且uid綁定了場外借貸產品, 則返回特定的保證金幣種數據
HTTP 請求
GET /v5/ins-loan/ensure-tokens-convert
請求參數
參數 | 是否必須 | 類型 | 說明 |
---|---|---|---|
productId | false | string | 產品ID. 若不傳,則返回所有產品的保證金幣種信息. 現貨返回折算率大於0的幣種. |
返回參數
參數 | 類型 | 說明 |
---|---|---|
marginToken | array | Object |
> productId | string | 產品ID |
> tokenInfo | array | 現貨保證金幣種信息 |
>> token | string | 保證金幣種 |
>> convertRatioList | array | 保證金幣種折算率列 |
>>> ladder | string | 階梯 |
>>> convertRatio | string | 折算率 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/ins-loan/ensure-tokens HTTP/1.1
Host: api-testnet.bybit.com
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getInstitutionalLendingMarginCoinInfoWithConversionRate({
productId: '81',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"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
}