Cancel Stop-Loss Order
Info
- This endpoint requires signature. For specific signature rules, please refer to Authentication
- This endpoint will trigger rate limit. For specific rules, please refer to Rate Limit.
HTTP request
POST /futures/cancel-position-stop-loss
Request parameters
| Parameter Name | Required | Type | Notes |
|---|---|---|---|
| market | true | string | Market name |
| market_type | true | string | Market type. Note: In spot related functions, only SPOT or MARGIN can be used. In futures related functions, only FUTURES can be used. |
| stop_loss_id | false | int | Stop-loss order ID. When provided, the specified stop‑loss orders will be canceled; when not provided, all stop‑loss orders will be canceled. |
Return parameters
| Parameter Name | Type | Notes |
|---|---|---|
| position_id | int | Position ID |
| market | string | Market name |
| market_type | string | Market Type |
| side | string | Position side |
| margin_mode | string | Position type |
| open_interest | string | Position |
| close_avbl | string | Amount that's available for position closing.Remaining amount that's available for position closing. |
| ath_position_amount | string | ATH position amount |
| unrealized_pnl | string | Unrealized profit.The current PNL of open positions, estimated at the Mark Price or the Latest Price. |
| realized_pnl | string | Realized PNL |
| avg_entry_price | string | Average entry price |
| cml_position_value | string | Cumulative position value |
| max_position_value | string | Max. position value |
| take_profit_price | string | Take-profit price |
| stop_loss_price | string | Stop-loss price |
| take_profit_type | string | Take-profit trigger price type.On CoinEx, you can choose different trigger price types when setting "TP/SL" (Take Profit and Stop Loss), using "Latest Price" or "Mark Price" as the trigger price. |
| stop_loss_type | string | Stop-loss trigger price type. On CoinEx, you can choose different trigger price types when setting "TP/SL" (Take Profit and Stop Loss), using "Latest Price" or "Mark Price" as the trigger price. |
| leverage | int | Leverage |
| margin_avbl | string | Margin available.Current margin amount = Initial margin + added margin - reduced margin |
| ath_margin_size | string | ATH margin amount |
| position_margin_rate | string | Position margin rate |
| maintenance_margin_rate | string | Maintenance margin rate.CoinEx adopts a Maintenance Margin Level System. The more positions you hold, the higher the maintenance margin rate, and the lower the leverage available. The fewer positions, the lower the maintenance margin rate, and the higher the leverage available. |
| maintenance_margin_value | string | Maintenance margin amount.Maintenance margin: The minimum amount of margin required to keep your position open. (Linear contract) Maintenance margin = Opening mark price * position amount * maintenance margin rate (Inverse contract) Maintenance margin = (Contract value * contract count / opening mark price) * maintenance margin rate |
| liq_price | string | Liquidation price. (Long position) Forced liquidation price = Settlement price * (1 - forced liquidation margin rate) / (1 - maintenance margin rate) (Short position) Forced liquidation price = Settlement price * (1 + forced liquidation margin rate) / (1 + maintenance margin rate) |
| bkr_price | string | Bankruptcy price. (Long position) Bankruptcy price = Settlement price* (1 - forced liquidation margin rate) (Short position) Bankruptcy price = Settlement price* (1 + liquidation margin rate) |
| adl_level | int | ADL (Auto-deleveraging) risk level, a number in the range of [1, 5]. The smaller the number, the lower the risk level, and vice versa. |
| settle_price | string | Settlement price, calculated as mark price |
| settle_value | string | Settlement value, calculated as mark price |
| created_at | int | Order creation time |
| updated_at | int | Order update time |
| stop_loss_list | array | Stop-loss order list |
| stop_loss_list[].id | int | Stop-loss order ID |
| stop_loss_list[].price | string | Stop-loss price |
| stop_loss_list[].type | string | Stop-loss trigger price type |
| stop_loss_list[].amount | string | Stop-loss amount |
| stop_loss_list[].is_all | bool | Whether this is a full‑position stop‑loss order |
| stop_loss_list[].created_at | int | Stop-loss order creation time |
| take_profit_list | array | Take-profit order list |
| take_profit_list[].id | int | Take-profit order ID |
| take_profit_list[].price | string | Take-profit price |
| take_profit_list[].type | string | Take-profit trigger price type |
| take_profit_list[].amount | string | Take-profit amount |
| take_profit_list[].is_all | bool | Whether this is a full‑position take-profit order |
| take_profit_list[].created_at | int | Take-profit order creation time |
Request example
{
"market": "CETUSDT",
"market_type": "FUTURES",
"stop_loss_id": 123456
}
Response example
{
"code": 0,
"data": {
"position_id": 927266133,
"market": "CETUSDT",
"market_type": "FUTURES",
"side": "long",
"margin_mode": "cross",
"open_interest": "1000000",
"close_avbl": "1000000",
"ath_position_amount": "1000000",
"unrealized_pnl": "8391.123989502",
"realized_pnl": "110396.83471965",
"avg_entry_price": "0.0631",
"cml_position_value": "1118787.958709152",
"max_position_value": "1302421.11392201",
"take_profit_price": "",
"stop_loss_price": "",
"take_profit_type": "",
"stop_loss_type": "",
"leverage": "10",
"margin_avbl": "210396.83471965",
"ath_margin_size": "210396.83471965",
"position_margin_rate": "0.050",
"maintenance_margin_rate": "0.005",
"maintenance_margin_value": "5000",
"liq_price": "0.05679",
"bkr_price": "0.053635",
"adl_level": 5,
"settle_price": "0.06817",
"settle_value": "1291322.83913829",
"created_at": 1691482451000,
"updated_at": 1691482451000,
"stop_loss_list": [],
"take_profit_list": []
},
"message": "OK"
}