Clear All

This section documents the clear_all action

This action is used to close all Perps positions and cancel all resting orders in your account

  • Both Perps and Spot resting orders will be canceled

  • This action will not sell Spot coins, use the Sell All action instead


Example Request

This example closes all open positions and cancels all resting orders in your account

{
  "action": "clear_all",
  "bot_id": BOT_ID,
  "api_key": "API_KEY"
}

coins

This optional parameter indicates a list of coins to use for the action

"coins": ["BTC", "ETH", "HYPE", "DOGE"]

Whitelisted coins in your bot settings are respected and will not be affected.


slippage_pct

This parameter indicates the Max. % slippage allowed for the trade to execute.

  • A value of 0.05 is equal to 5%

"slippage_pct": 0.05

Default slippage is set at 5% when not specified


delay

This parameter indicates 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?