Skip to content
API reference /Account & trading

Create or revise a TP/SL instruction

Submit a stop-loss instruction for 12 ETH contracts at 2,320.

Endpoint & access

POST
/api/v1/usdt/plan_close_order

Whitelist Required

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

Rate limit

  • 3 requests / 1 second

JSON body

Content-Type: application/json

Field Data type Required Meaning
instrumentId string YES Contract abbreviation, such as BTC or ETH.
direction string YES closeLong or closeShort.
separatedPositionId string Conditional Separated position ID when targeting a separated position.
tpPlanId long Conditional Take-profit plan ID when modifying or removing a plan.
tpOrderType string Conditional planLimit or planMarket for the take-profit instruction.
tpTpslType string Conditional normal for a quantity-based instruction or position for a position instruction.
tpTriggerPrice decimal Conditional Take-profit trigger price.
tpOrderPrice decimal Conditional Take-profit order price for planLimit.
tpQuantity integer Conditional Quantity in contracts when tpTpslType is normal. Defaults to 0.
tpTriggerWay string NO mark or latest. Defaults to latest.
tpRemove boolean NO Set to true to remove the take-profit plan. Defaults to false.
slPlanId long Conditional Stop-loss plan ID when modifying or removing a plan.
slOrderType string Conditional planLimit or planMarket for the stop-loss instruction.
slTpslType string Conditional normal for a quantity-based instruction or position for a position instruction.
slTriggerPrice decimal Conditional Stop-loss trigger price.
slOrderPrice decimal Conditional Stop-loss order price for planLimit.
slQuantity integer Conditional Quantity in contracts when slTpslType is normal. Defaults to 0.
slTriggerWay string NO mark or latest. Defaults to latest.
slRemove boolean NO Set to true to remove the stop-loss plan. Defaults to false.

Supply the tp fields, the sl fields, or both for the instructions you want to create, update, or remove.

Returned fields

If empty, indicating successful creation.

Example input

JSON request body:

{
  "instrumentId": "ETH",
  "direction": "closeLong",
  "slTpslType": "normal",
  "slOrderType": "planLimit",
  "slQuantity": 12,
  "slTriggerPrice": 2320,
  "slOrderPrice": 2320,
  "slTriggerWay": "latest"
}

Example result

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