Skip to content
API reference /Account & trading

Manage an order’s TP/SL instructions

Attach a market take-profit instruction for 12 contracts at a trigger price of 2,580.

Endpoint & access

POST
/api/v1/usdt/order_tpsl

Whitelist Required

Request whitelist approval for your API key. This endpoint is available only after approval.

JSON body

Content-Type: application/json

Field Data type Required Meaning
order_id long YES Positive parent order ID.
tp_plan_id long NO Positive take-profit plan ID. Required to remove an existing plan.
tp_order_type string NO planLimit or planMarket. Required when creating a plan.
tp_trigger_price decimal NO Positive take-profit trigger price.
tp_order_price decimal NO Positive take-profit order price. Required when submitting planLimit.
tp_quantity integer NO Positive take-profit quantity. Required when creating a plan.
tp_trigger_way string NO mark or latest. Defaults to latest.
tp_remove boolean NO Set to true to remove the take-profit plan. Defaults to false.
sl_plan_id long NO Positive stop-loss plan ID. Required to remove an existing plan.
sl_order_type string NO planLimit or planMarket. Required when creating a plan.
sl_trigger_price decimal NO Positive stop-loss trigger price.
sl_order_price decimal NO Positive stop-loss order price. Required when submitting planLimit.
sl_quantity integer NO Positive stop-loss quantity. Required when creating a plan.
sl_trigger_way string NO mark or latest. Defaults to latest.
sl_remove boolean NO Set to true to remove the stop-loss plan. Defaults to false.

Supply at least one take-profit or stop-loss change.

This endpoint requires a signed request. Send the request parameters in a JSON body.

Returned fields

Field Data type Meaning
data string success when the update succeeds.

Example input

{
  "order_id": 7302100000000042001,
  "tp_order_type": "planMarket",
  "tp_trigger_price": 2580,
  "tp_quantity": 12
}

Example result

{
  "code": 200,
  "message": null,
  "data": "success"
}