Two paths
Size means remaining size
Modify request
What changed?
Size decreased onlyEdited in place — queue position kept
Price changed, or size increasedCancel, then place a new order — queue position lost
An order for 10 that filled 4 has 6 remaining
Change it to 5 — a decrease
Change it to 8 — an increase, though it is under the original 10
The replace path is ordered, not atomicThe new order is only attempted if the cancel succeeded, and it can still fail on margin — leaving you cancelled and not resting.
Why queue position matters
At a given price level, orders fill in the order they arrived. An order at the front of a level fills before one behind it — and at a busy level, the difference between front and back is the difference between filling and watching the market leave. For a market maker this is the whole game. Reducing your size to manage risk without losing your place is materially different from having to re-queue behind everyone who arrived while you were deciding.What “size” means here
Size comparisons use remaining size, not the size you originally submitted. An order for 10 that has filled 4 has 6 remaining. Changing it to 5 is a decrease — edited in place. Changing it to 8 is an increase relative to 6, even though it is less than the original 10 — cancel and replace.The cancel-and-replace path can partially fail
When a modification takes the cancel-and-replace path, the two steps are ordered but not atomic:- The new order is only attempted if the cancel succeeded. You cannot end up with both.
- The new order can still fail — most often on margin, since the market may have moved between the two steps.
Timing
An in-place size decrease applies in the current block — there is no waiting. Price changes and size increases go through the two-step path and are subject to the same sequencing as any cancel and any new order. The cancel runs in the cancellation phase, ahead of aggressive orders in the same block, which is what stops your stale quote from being picked off by an order that arrived alongside your modification. Time-in-force carries over: a modified order keeps the same time-in-force, and it still governs the replacement.Practical notes
- Shrink freely. It is cheap and costs nothing in priority.
- Treat a price change as a new order, because it is one.
- Use client order IDs if you modify programmatically. They let you confirm what exists after an ambiguous response rather than inferring it.
- Cancel and re-place explicitly when you are changing several fields at once — you get the same result with clearer failure handling.
Where to go next
Order book
How price-time priority determines fill order at a level.
Transaction sequencing
Why cancels execute before aggressive orders in the same block.
Client order ID
Confirming what exists after an ambiguous response.
Order types
Time-in-force, and what carries over through a modification.