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.
Use cancel all orders before squaring off positions to avoid pending orders executing after your exit logic.
Last updated: 22 Dec 2025
Related Articles
When Should I Use Modify Order, and Which Fields Can Be Changed?
The modify order action in Automate lets you change the details of a pending order during an automation run using its Order ID. It is useful when an order is placed but not yet executed, and you want to update its parameters based on changing ...
What is the Output section in nodes, and how can I use it?
Each node can produce output values (data) when it runs. The Output section is where you view and copy those values so you can reuse them in later nodes. Output values are the list of data fields a node exposes (for example: order_id, filled_price, ...
How does Orderbook check work for counting pending, executed, cancelled, or rejected orders?
Orderbook check is a Trigger type in FYERS Automate that lets your automation move forward only after a specific number of orders reach a selected orderbook status during the same automation run. This trigger is used to control the flow of your ...
How does the Order status trigger work, and which statuses can I wait for?
Order status is a Trigger type in FYERS Automate. It lets your automation move forward only when a specific order (placed earlier in the same automation run) reaches the status you choose. This trigger does not place orders by itself. Use Order ...
How Do I Place Trades With Place Order and Choose Instrument, Strike/Expiry, and Quantity/Lots?
The place order action in Automate lets you place a live trade automatically when your automation reaches a specific trigger, condition, or step. Based on the order type you select, you can place options, futures, or a direct order for a symbol, and ...