Quant Memo
Core

Cancel/Replace: What Actually Happens

Amending a resting order isn't a small edit made in place — under the hood it's usually a cancel of the old order and the birth of a brand new one, which is why a "small" price change can silently cost you your place in the queue.

Prerequisites: The Execution Report State Machine

Traders talk about "amending" or "modifying" an order all the time — moving a resting limit order's price a cent, or changing its size — as if it's a small edit to something already in the book. Mechanically, on most exchanges, that's not what happens. A "cancel/replace" (sometimes called "modify") is really two operations bundled into one request: the original order is cancelled, and a brand-new order is created in its place, with its own arrival time. Whether that new order keeps its old place in the queue or goes to the back of the line depends entirely on what changed.

The rule that decides queue priority

Most price-time priority venues follow a simple rule: change the price, and you lose your queue position entirely — the new order goes to the back of the line at the new price level, timestamped now. Change only the size, and specifically only reduce it, and many venues let you keep your original queue position and timestamp, since you're taking away from the market rather than asking for more priority. Increase the size instead, and most venues treat that as a new arrival too, sending you to the back of the queue for the incremental portion, or sometimes for the whole revised order.

Change requestedTypical effect on queue position
Reduce size onlyUsually keeps original priority/timestamp
Increase sizeUsually loses priority for the increase (rules vary by venue)
Change price (any amount)Always loses priority — treated as a brand-new order at the new price

A worked example

You have a resting bid for 1,000 shares at $50.00, and you're 3,000 shares deep in the queue behind other orders already at that price — you'll fill only once those 3,000 shares ahead of you trade first.

  • You send an amend reducing size to 600 shares. On most venues, you keep your place in line — you're still effectively "3,000 shares deep," now just needing 600 of your own to clear once your turn comes.
  • You send an amend changing price to $50.01 instead, even though it's economically a tiny change. Under the hood, the exchange cancels your $50.00 order entirely and creates a new order at $50.01, timestamped at this instant. If other orders already exist at $50.01, you now queue behind all of them too — you have given up your priority completely for a one-cent price change.

Whether an "amend" preserves your queue priority depends on what changed, not on how small the change looks to a human. Reducing size is usually safe; changing price — even by the minimum tick — is treated as cancelling the old order and creating an entirely new one at the back of the line.

Why this is a genuine trap

A market maker managing quotes across a fast-moving market might reflexively "nudge" a price by a cent to stay competitive, not realizing that doing so surrenders queue position that took minutes to build. Execution algorithms and market-making systems are written specifically to account for this — sometimes cancelling and resubmitting an order deliberately (to reset the ClOrdID, OrigClOrdID And Order Identity used to track it) is the right move, and sometimes preserving priority by leaving a slightly stale price alone is worth more than chasing the tightest possible quote.

Never assume a cancel/replace is free. On many venues it also interacts with Self-Trade Prevention Modes: Cancel Newest, Oldest, Decrement and can trigger unwanted behavior if a firm's own resting order and its own new replacement order briefly cross — exchanges have specific rules to prevent a firm's cancel/replace from accidentally trading against itself, but the details vary by venue and protocol.

At a system level, Mass Cancel And Cancel-On-Disconnect covers the related but distinct case of cancelling many orders at once — deliberately, or automatically when a session drops — rather than amending one order at a time.

Why venues don't just support a true in-place amend

It's a fair question why exchanges don't simply let a price change happen in place, preserving priority, rather than forcing a cancel-and-replace. The answer is that price-time priority is only meaningful if earlier arrival at a price genuinely means something — if a participant could change price while keeping an old timestamp, they could effectively "reserve" a queue position at one price and then relocate it to a better price whenever it suited them, which would make the priority queue nearly meaningless as an incentive to commit to a price early. Treating any price change as a brand-new order, with a brand-new timestamp, is what keeps the incentive intact: the only way to earn priority at a given price is to have genuinely been resting there first.

This is also why some trading strategies deliberately avoid amending orders at all, preferring instead to let a stale order sit and simply layer in a fresh order at the new level, monitoring both — depending on the venue's specific rules, the "cost" of an amend and the cost of a fresh cancel-then-send can differ subtly in fees or in exactly how the exchange's matching engine sequences the two resulting messages, details serious market-making systems tune carefully for their specific venues.

Related concepts

Practice in interviews

Further reading

  • FIX Trading Community, FIX 4.4 Specification
  • Harris, Trading and Exchanges (ch. 4)
ShareTwitterLinkedIn