Skip to main content

Set Risk Limit

The risk limit will limit the maximum position value you can hold under different margin requirements. If you want to hold a bigger position size, you need more margin. This interface can set the risk limit of a single position. If the order exceeds the current risk limit when placing an order, it will be rejected.

Normal account covers: USDT perpetual / Inverse contract

tip

Set the risk limit of the position. You can get risk limit information for each symbol here.

HTTP Request

POST /cloud/trade/v3/position/set-risk-limit

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type
  • Normal account: linear, inverse. Please note that category is not involved with business logic
symboltruestringSymbol name
riskIdtrueintegerRisk limit ID
positionIdxfalseintegerUsed to identify positions in different position modes. For hedge mode, it is required
  • 0: one-way mode
  • 1: hedge-mode Buy side
  • 2: hedge-mode Sell side

Response Parameters

ParameterTypeComments
categorystringProduct type
riskIdintegerRisk limit ID
riskLimitValuestringThe position limit value corresponding to this risk ID

Request Example

POST /cloud/trade/v3/position/set-risk-limit HTTP/1.1
Host: openapi-testnet.zoomex.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672282269774
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"category": "linear",
"symbol": "BTCUSDT",
"riskId": 4,
"positionIdx": null
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"riskId": 4,
"riskLimitValue": "4000000",
"category": "linear"
},
"retExtInfo": {},
"time": 1672282270571
}