Get Risk Limit
Query for the risk limit.
Covers: USDT perpetual / USDC contract / Inverse contract
info
category=linear
returns data set of 30 symbols each request, please use cursor to get next data set.
HTTP Request
GET /v5/market/risk-limit
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
category | true | string | Product type. linear ,inverse |
symbol | false | string | Symbol name, like BTCUSDT , uppercase only |
cursor | false | string | Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set |
Response Parameters
Parameter | Type | Comments |
---|---|---|
category | string | Product type |
list | array | Object |
> id | integer | Risk ID |
> symbol | string | Symbol name |
> riskLimitValue | string | Position limit |
> maintenanceMargin | number | Maintain margin rate |
> initialMargin | number | Initial margin rate |
> isLowestRisk | integer | 1 : true, 0 : false |
> maxLeverage | string | Allowed max leverage |
> mmDeduction | string | The maintenance margin deduction value when risk limit tier changed |
nextPageCursor | string | Refer to the cursor request parameter |
Request Example
- 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);
});
Response Example
{
"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
}