Skip to content

Order cancellation

Cancelling an order withdraws its unexecuted remainder. Follow a 100-share cancellation race, distinguish requests from confirmation, and reconcile delayed fills before replacing quantity.

Order cancellation is the withdrawal of the unexecuted part of a trading order when the cancellation takes effect. Sending a cancellation request starts that process; it does not establish that the remainder has stopped trading. A strategy that treats the request as a completed cancellation can submit a replacement while the original order can still fill.
Cancellation preserves trades that have already executed. Cancelling the remainder of a buy does not sell back the shares already bought or erase the associated payment. Investor.gov warns that an electronic cancellation receipt need not mean the order was cancelled, and recommends confirming the outcome before placing another trade.

Follow the shares through the race

Consider one synthetic buy order for 100 shares resting in an order book. It has already filled 40 shares when the strategy asks to cancel the remainder. Another ten shares execute while the request is in flight. The cancellation then takes effect on the remaining 50 shares, and the final reports are reconciled.
Event in the synthetic sequenceCumulative filled, sharesStill executable, sharesConfirmed cancelled, shares
Before the request40600
Cancellation requested40600
Another ten shares execute50500
Remaining quantity confirmed cancelled50050
These are the reconstructed states in economic event order. A live strategy may learn about an event later. The request row releases no quantity; the final row closes the order with 50 filled and 50 cancelled. “Cancelled” describes the order's terminal state, not a claim that its entire original quantity escaped execution.
Synthetic 100-share buy: 40 filled and 60 executable before and after the cancellation request; another ten fill, leaving 50 filled and 50 executable; confirmation leaves 50 filled, zero executable and 50 cancelled.
Synthetic 100-share buy: 40 filled and 60 executable before and after the cancellation request; another ten fill, leaving 50 filled and 50 executable; confirmation leaves 50 filled, zero executable and 50 cancelled.
Original synthetic single-order ledger, measured in shares. Rows follow economic events, with no clock scale. No replacement, expiry or trade correction occurs within this sequence.

For this ledger, every share belongs to exactly one bucket:

100=filled+executable+cancelled.100=\text{filled}+\text{executable}+\text{cancelled}.

The extra fill moves ten shares from executable to filled. The successful cancellation moves the last 50 from executable to cancelled. Neither transition undoes the earlier 40-share fill.

The cancelled bucket is an accounting description, not a universal message field. In the FIX EP284 cancellation examples, a terminal cancelled report has LeavesQty of zero while CumQty retains the executed quantity. In our example, 50 cancelled shares therefore does not mean LeavesQty is 50.

Event order and receipt order answer different questions

Event order determines whether the original order was still eligible to execute. Receipt or processing order determines when a particular application learned what happened. A fill generated before cancellation took effect can be processed by a strategy after it has processed a cancellation report—for example, when reports use separate channels or local processing is delayed. This does not imply that ordinary fills are permitted after the cancellation became effective at the venue.

Apply the documented sequencing rules for each connection and reporting channel. Local wall-clock timestamps alone cannot establish a single authoritative ordering across them. A request timeout likewise says that a response was not observed by a deadline; it does not prove cancellation.

For reconciliation, match the order identifiers and uniquely identified executions, compare the fill ledger with the authoritative cumulative filled quantity, and establish whether any quantity remains executable. A cumulative fill total is a check on the executions, not another trade to add to them. Repeated delivery of the same execution must not create another purchase. If reports are missing or inconsistent, obtain the broker's or venue's documented order and execution records before treating the unresolved quantity as available for a replacement.

This reconciliation rule is an operational application of the distinction between order state and trade events. The exact identifiers, sequencing, recovery requests and terminal messages depend on the interface.

A rejected cancel still needs a state

The FIX Trading Community distinguishes Pending Cancel from a successful cancellation. Its EP284 scenarios B.1.b and B.1.c show fills during cancellation processing; B.1.c ends with a too late to cancel rejection after the order fills completely. An order-state label alone therefore cannot substitute for the fill quantities. See the primary specification, pp. 5 and 13–14.

A rejected request does not itself cancel the order. Reconcile the reported state: there may still be a working remainder, or the order may already be fully filled. An unknown-order response also needs investigation against the correct identifiers and records; it is not evidence that nothing traded. Separately authorised trade corrections or busts are different events from cancelling an unfilled remainder.

Now return to the synthetic 100-share objective. Once the final state is reconciled, only 50 additional shares are needed to complete that original objective. Replacing the 60 shares that were outstanding when cancellation was requested would permit 110 total filled shares, overshooting the objective by ten. During the unresolved request, the old remainder must still be included in the strategy's possible exposure.
Live Execution Monitoring extends this idea to parent-order quantity limits, outstanding reservations, duplicate messages and controlled recovery. It has a public preview; the full lesson requires membership.

Sources

  • Investor.gov: Online Investing, “If you cancel an order, make sure the cancellation worked before placing another trade” — the difference between a receipt and a completed cancellation, and the risk of duplicate trading.
  • FIX Trading Community: Order State Changes, FIX Latest as of EP284, November 2023, pp. 4–5 and scenarios B.1.b–B.1.c, pp. 13–14 — pending status, executions during cancellation processing, terminal quantities and rejection when too late to cancel. Consult the applicable broker or venue implementation for its precise message workflow.
  • Rishi K. Narang, Inside the Black Box: A Simple Guide to Quantitative and High-Frequency Trading, 2nd edition (Wiley, 2013), Chapter 7, “Aggressive versus Passive,” pp. 120–122 — partial execution, resting orders and the exposure involved in cancelling and replacing passive orders. The share ledger and figure here are original.
Last updated
  • order management
  • execution
  • cancellation
  • partial fills
  • operational risk
← Back to the glossaryBack to top ↑