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/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/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/pending orders across segments.

2) Cancel specific order

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

Steps to use the cancel order action in Automate

Follow these steps when you are building a new automation from scratch.

  • Log in to FYERS Web and go to Automate → Dashboard.
  • Click Create automation.
  • In the workflow canvas, add the required start/trigger/condition nodes for your strategy.
  • 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/condition path.
  • Click Validate to ensure the automation has no errors.
  • After successful validation, click Run now (or schedule it, if required).
Use cancel all orders before squaring off positions to avoid pending orders executing after your exit logic.

Last updated: 22 Dec 2025