查詢合約風險限額
查詢期貨合約的風險限額表
覆蓋範圍: USDT永續 / USDC永續 / USDC交割 / 反向合約
提示
什麼是風險限額?風險限額(USDT合約)
信息
當category=linear
, 每次請求返回30個symbol的風險限額數據, 請通過cursor來實現翻頁查詢下一組30個symbol的數據
HTTP請求
GET /v5/market/risk-limit
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
category | true | string | 產品類型. linear ,inverse |
symbol | false | string | 合約名稱 |
cursor | false | string | 游標,用於翻頁 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
category | string | 產品類型 |
list | array | Object |
> id | integer | 風險限額id |
> symbol | string | 合約名稱 |
> riskLimitValue | string | 風險限制額度 |
> maintenanceMargin | number | 維持保證金率 |
> initialMargin | number | 初始保證金率 |
> isLowestRisk | integer | 是否是最低風險限額. 1 : true, 0 : false |
> maxLeverage | string | 該風險限額允許的最大槓桿 |
> mmDeduction | string | 維持保證金扣減額 |
nextPageCursor | string | 下一頁游標, 配合cursor 使用 |
請求示例
- HTTP
- Python
- GO
- Java
- Node.js
GET /v5/market/risk-limit?category=inverse&symbol=BTCUSD HTTP/1.1
Host: api-testnet.bybit.com
from pybit.unified_trading import HTTP
session = HTTP(testnet=True)
print(session.get_risk_limit(
category="inverse",
symbol="BTCUSD",
))
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
client := bybit.NewBybitHttpClient("", "", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"category": "linear", "symbol": "BTCUSDT"}
client.NewUtaBybitServiceWithParams(params).GetMarketRiskLimits(context.Background())
import com.bybit.api.client.domain.CategoryType;
import com.bybit.api.client.domain.market.request.MarketDataRequest;
import com.bybit.api.client.service.BybitApiClientFactory;
var client = BybitApiClientFactory.newInstance().newAsyncMarketDataRestClient();
var riskMimitRequest = MarketDataRequest.builder().category(CategoryType.INVERSE).symbol("ADAUSD").build();
client.getRiskLimit(riskMimitRequest, System.out::println);
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
});
client
.getRiskLimit({
category: 'inverse',
symbol: 'BTCUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "inverse",
"list": [
{
"id": 1,
"symbol": "BTCUSD",
"riskLimitValue": "150",
"maintenanceMargin": "0.5",
"initialMargin": "1",
"isLowestRisk": 1,
"maxLeverage": "100.00",
"mmDeduction": ""
},
....
]
},
"retExtInfo": {},
"time": 1672054488010
}