The cancel race: deleting an order that is already filling
Posted: Sat Oct 31, 2026 2:18 pm
A limit order that price is approaching feels easy to cancel if conditions change. But a cancel request takes time to travel and be processed, and during that window the order may fill. The result is a position the trader thought was avoided.
The race is most dangerous in fast markets, where the delay between deciding and acting is the difference between a cancel and a fill. News and impulsive spikes are classic cases.
After sending a cancel, do not assume it worked. Check the order list and position list. If the order filled, the response should be immediate: either close the position or manage it as planned.
In code, treat the cancel as a request with an uncertain outcome. Handle both results: confirmed cancelled and already filled. Many EAs only handle the first.
An additional risk is partial fills. A cancel may succeed for the remaining size while part of the order has already filled, leaving an unexpected small position.
How does the system verify the result of a cancel request?
The race is most dangerous in fast markets, where the delay between deciding and acting is the difference between a cancel and a fill. News and impulsive spikes are classic cases.
After sending a cancel, do not assume it worked. Check the order list and position list. If the order filled, the response should be immediate: either close the position or manage it as planned.
In code, treat the cancel as a request with an uncertain outcome. Handle both results: confirmed cancelled and already filled. Many EAs only handle the first.
An additional risk is partial fills. A cancel may succeed for the remaining size while part of the order has already filled, leaving an unexpected small position.
How does the system verify the result of a cancel request?