How do I use Cancel order to cancel all open orders or a specific Order ID?

How Do I Use Cancel Order To Cancel All Open Orders or a Specific Order ID?

The Cancel order action in Automate helps you automatically cancel open or pending orders when your automation reaches a specific trigger, condition, or exit path.

You can either cancel all open orders or cancel a specific pending order by entering its Order ID. This is useful for risk control and avoiding unintended executions when your strategy conditions change.

What does cancel order do?

When a Cancel order action node is executed:

  • A cancel request is sent to the order book.
  • Only open or pending orders are targeted for cancellation.
  • Orders that are already executed, rejected, or cancelled are not affected.
  • The cancellation scope depends on the option you choose.

Types of cancel order

1) Cancel all orders

  • Cancels all open or pending orders across segments.

2) Cancel specific order

  • Cancels one pending order based on the entered Order ID.
  • Other open or pending orders remain unaffected.

Steps to use the Cancel order action in Automate

Follow these steps when building a new automation:

  • Log in to FYERS Web and go to Automate → Dashboard.
  • Click Create automation.
  • Add the required start, trigger, or condition nodes on the workflow canvas.
  • In the left panel, open the Actions tab.
  • Expand Cancel order.
  • Drag and drop one of the following onto the canvas:
    • Cancel all orders
    • Cancel specific order
  • If you chose Cancel specific order, enter the required Order ID.
  • Connect the Cancel order node to the required trigger or condition path.
  • Click Start to run the automation after configuring and connecting all nodes.
Use Cancel all orders before squaring off positions to prevent pending orders from executing after your exit logic.

Last updated: 22 Dec 2025