Skip to main content

Modify Take-Profit/Stop-Loss on Plan Order

Response Example

{
"success": true,
"code": 0
}
  • POST /api/v1/private/planorder/change_stop_order

Required Permission: Order Placing

Special Notes:

When (stopLossPrice != null && stopLossPrice > 0) is met, a stop-loss price is set. The stop-loss trigger price type field (lossTrend) must be provided and must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error); When (takeProfitPrice != null && takeProfitPrice > 0) is met, a take-profit price is set. The take-profit trigger price type field (profitTrend) must be provided and must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error); When stopLossPrice == null || stopLossPrice == 0, it means the stop-loss setting is canceled; When takeProfitPrice == null || takeProfitPrice == 0, it means the take-profit setting is canceled; When both stopLossPrice and takeProfitPrice are not provided, or both are 0, it means cancel both take-profit and stop-loss settings; lossTrend / profitTrend values: if not provided, default to 1 (latest price); if provided, must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error)

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
orderIdlongtrueOrder ID
lossTrendintfalseStop-loss reference price type 1 latest price 2 fair price 3 index price
profitTrendintfalseTake-profit reference price type 1 latest price 2 fair price 3 index price
stopLossPricedecimalfalseStop-loss price
takeProfitPricedecimalfalseTake-profit price

Response Parameters:

Common parameters, success: true success, false failure