Queue Position and Priority
How matching engines decide who fills first, why your spot in the queue is an asset with real option value, and how price-time priority differs from pro-rata.
Prerequisites: Order Book Mechanics
When you post a limit order, you don't just get a price — you get a place in line. The matching engine needs a rule for who fills first when several resting orders could satisfy an incoming trade, and that rule quietly decides whether your passive order earns money or gets picked off. Understanding priority is the difference between thinking of a limit order as "a price" and thinking of it as "a queue position," which is how professionals actually reason about it.
Price first, then time
The near-universal rule is price-time priority, also called FIFO (first in, first out):
- Price wins. A better-priced order always fills before a worse-priced one. A bid at $100.01 is hit before a bid at $100.00, no matter who arrived when.
- Time breaks ties. Among orders at the same price, the one that arrived earliest fills first.
So each price level is a first-in-first-out queue. If you post a buy at the best bid and there are already shares resting there, you sit at queue position — that many shares must trade (or cancel) before a single share of yours fills.
Your position is an asset
Queue position is not bookkeeping — it is worth money. Two things move you toward the front without any effort on your part: market orders on the other side that eat the front of the queue, and cancellations ahead of you. Both shrink . The probability that you fill before the price moves is a decreasing function of how many shares sit in front of you, and Moallemi & Yuan (2016) show this "value of queue position" can be a meaningful fraction of the spread itself — enough that the whole game in a one-tick market is getting to the front and staying there.
But there is a catch that makes front-of-queue genuinely valuable rather than just convenient. A quick fill against random, uninformed flow is good news: you captured the spread before the price moved. A fill that comes precisely because the whole queue is being swept is bad news — the price is about to move against you, and you were the passive counterparty holding the door open. That is Adverse Selection. Front-of-queue orders skew toward the good kind of fill; back-of-queue orders skew toward the bad kind.
Under price-time priority, your spot in the queue is an asset. Being early means you fill against uninformed flow and capture the spread; being at the back means you tend to fill only as the queue is swept — precisely when the price is about to move against you (adverse selection).
Cancelling costs you everything
Time priority is earned and cannot be transferred. The moment you cancel and repost — even one tick away and back — you go to the back of the new level's queue. This single fact drives an enormous amount of real market behavior: it makes "should I stay put or reprice?" a genuine optimization, it is why quoted books flicker constantly, and it is why traders will hold a stale-looking quote rather than surrender a hard-won front-of-line spot.
Worked example
You post 500 shares to buy at the best bid, and 3,000 shares are already resting there, so your queue position is 3,000. Over the next few minutes, market sells hit the bid for 2,200 shares and another 600 shares ahead of you cancel. You have advanced by shares, leaving only shares in front of you. The very next 200-share market sell clears them, and the one after that begins filling you. If that fill arrives while the mid is steady, you earned the half-spread cleanly. If instead the 200 cleared because a large informed seller is walking the book down, your fill is the first slice of a move against you — same fill, opposite meaning.
Pro-rata: a different game entirely
Not every venue uses FIFO. Many futures and options markets use pro-rata matching: an incoming order is split across all resting orders at a price in proportion to their displayed size, ignoring arrival time. There, being early buys you nothing — the incentive flips to displaying large size to grab a bigger slice of each fill, which is why pro-rata books show inflated, often over-stated quantities. Some venues blend the two (a small time-priority "top" plus pro-rata below). Always know which regime you are trading, because it inverts the optimal strategy.
Cancelling and reposting sends you to the back of the queue — priority is never transferable. And the matching rule flips the whole strategy: FIFO rewards arriving early, pro-rata rewards displaying large. Trading a pro-rata book as if it were FIFO (or vice versa) is a classic, expensive mistake.
In a one-tick, large-tick name the spread can't narrow, so price competition is frozen and time competition is everything. That is exactly the regime where shaving microseconds off your order entry — and never needlessly cancelling — pays off most.
In interviews
Expect "you post at the bid with 10,000 shares ahead of you — what determines whether you fill, and is a fill good or bad news?" The strong answer: you advance as market orders and cancels clear the front, a fast fill against uninformed flow captures the spread, but a fill as the queue is swept is Adverse Selection. A natural follow-up is how Order-Flow Imbalance and rebates interact with the decision to hold or reprice.
Related concepts
Practice in interviews
Further reading
- Harris, Trading and Exchanges: Market Microstructure for Practitioners
- Cont, Stoikov & Talreja (2010), A Stochastic Model for Order Book Dynamics
- Moallemi & Yuan (2016), The Value of Queue Position in a Limit Order Book