Cancel TP/SL

This section documents the cancel_tpsl action

This action is used to cancel your position's take-profit and stop-loss orders for a specified coin.

  • All reduce-only trigger orders will be canceled (Take Profit Market and Stop Market)


Example Request

This example cancels all TP and SL orders for a BTC position.

{
  "action": "cancel_tpsl",
  "coin": "BTC",
  "type": "tpsl",
  "bot_id": BOT_ID,
  "api_key": "API_KEY"
}

coin*

This required parameter indicates which coin to use for the action.

"coin": "BTC"

Type

This parameter indicates which type of TPSL orders to cancel for your position.

  • A value of tpsl cancels all take-profit and stop-loss orders

  • A value of tp cancels all take-profit orders

  • A value of sl cancels all stop-loss orders

"type": "tpsl"

Default value tpsl is used when not specified


delay

This parameter specifies a number of seconds to wait before triggering the action

  • A value of 5 is equal to a 5 seconds delay

  • Max. allowed delay is 10 seconds

"delay": 5

Last updated

Was this helpful?