Learn · Markets · Market Structure
The Limit Order Book and Price-Time Priority
The book is a queue at every price: the engine matches on price first and time second, so a resting order is a place in a line. The only way to buy a better place is to improve the price, and that costs you a cent a share on every fill.
A book is a queue at every price
A **limit order book** is not a list of prices, it is a queue per price. At each price level, orders are served in the order they arrived. The engine applies two rules, always in this order: **price priority** (a better price goes first) and **time priority** (at the same price, an earlier order goes first). That is why a resting order is best described as a *place in a line*. Being at the right price is necessary but not sufficient — you also have to be near the front of the line at that price, and the line is invisible in a retail app that shows you only the best bid and offer. • **Price first**: a buy at $182.31 beats every buy at $182.30, no matter when they arrived • **Time second**: among buys at $182.30, the earliest is served first • **Displayed beats hidden**: at the same price, published size executes ahead of non-displayed size • **Amending loses your place**: a cancel-and-replace is a new order, so it goes to the back of the line That last rule is why exchanges offer "amend and keep priority" for size decreases. If you cancel and re-enter to change a detail, you have voluntarily moved to the back of the queue you spent time earning a place in.
What the engine does when your order arrives
When your order reaches the book it is matched immediately if it crosses the spread, and the walk is mechanical: the best opposite price first, then the next, until you are filled or the price is worse than your limit (M4). If it does not cross, it joins the back of the line at its price. The quote you see is not the whole book. Most public depth feeds show only a handful of levels, **odd lots** are often not displayed at all, and hidden or reserve orders exist in size at the same prices. Some venues publish far more depth than others, and most retail interfaces publish almost none — which is why a learner can watch a chart for a year and never see the queue that decides their fill. The practical consequence is a real fork. If you want a fill soon, you can **cross the spread** and pay the full spread now, or **step ahead** of the line by a tick and pay one cent a share for the front of the queue. If you want the best price, you **join the line** and accept that your fill depends on flow you cannot see. A penny of price improvement sounds trivial until you price it as a cost of doing business: on 100,000 shares a year it is $1,000, and on a $400 stock it is more than a whole basis point of the spread you were trying to capture.
What a passive fill tells you
A fill is not just a trade, it is a message — and it is rarely the message a patient buyer wants to hear. If you are bidding and someone chooses to sell to you, the other side of that decision was a person with a view. On average, the party who acts is the party with a reason. This is **adverse selection**, and it is the hidden cost of resting an order: the queue buys you the spread on noise and hands you the full loss on information. Run the logic on the two tapes from the lab. On the quiet tape, 1,300 shares traded at your price and none of it was yours — small, mostly uninformed flow, absorbed entirely by the queue ahead of you. On the tape with a 4,200-share seller you filled, and you filled because one large, decisive trader wanted out at your price. The fill you were hoping for is the fill that tells you the least. That is not bad luck; it is the structure of the arrangement. So patience is not free, it is *conditionally* cheap. A resting order earns the spread when the flow it meets is noise and loses more than the spread when the flow it meets is information. Across many fills the two terms roughly balance, which is exactly why a market maker can quote a penny wide and still run a business on it (M10) — and why a learner who measures only the fills they got, and not the news they arrived with, will overrate being passive. • You fill when someone chooses your price, and that choice is evidence about the price • Small, noisy flow is what makes a resting order profitable at all • A sudden large fill at your price is more likely information than luck • The queue ahead of you is a filter: it absorbs the noise and passes the information through to you This is the honest answer to “why did my limit order fill right before the stock fell 2%?” The line in front of you filtered out the trades you wanted and delivered the one you did not.
Hidden size, and what it does to the line you can see
The line in front of you is shorter than the interest at your price, and the gap has a name. Three kinds of order deliberately keep their size off the public book, and each one changes what a visible queue means. A **reserve** or iceberg order publishes a small tip — often 100 shares — and refreshes it as it trades. When the tip is exhausted, the next tip arrives with the *original* order’s time priority, which is the whole point: the queue you can see keeps refilling from a place you cannot. A **hidden** order publishes nothing at all. And a **peg** re-prices itself to the NBBO automatically, so it tracks the touch without a repricing decision. The rule that keeps this honest is priority. At any single price, **displayed size is served before non-displayed size**, which is why a hidden order cannot simply jump ahead of the visible line. So the queue ahead of you is real in the sense that those displayed shares execute first — but the depth behind the touch is deeper than the book shows, and a price level can hold far longer than the displayed size suggests. This is the mechanism behind the common impression that a bid “keeps refilling”: the tip is being refreshed, and every refill keeps its place in the line. A price level, displayed and actual — Displayed bid at $50.00: 300 shares — the tip of an iceberg · Actual resting interest at $50.00: 4,000 shares across two reserve orders ← · A 500-share seller arrives: the tip fills, refreshes, and the level holds · Your displayed order behind the tip: served ahead of the hidden portion at the same price ← · What the book told you: nothing about the 3,700 shares you could not see This is why “the size is only 300” is not a reason to expect the level to break. Displayed size measures what somebody chose to show you, not what is willing to trade — and the two differ most in exactly the names where you would most like to know.
Not every market is price-time
Price-time priority is the rule most equity markets use and it is not the only rule in the market, which matters because the queue strategy that follows from it does not transfer. **Pro-rata allocation** is the standard alternative, and it is used widely in options and in some futures markets. Under pro-rata, arriving orders at the same price are filled in proportion to their size rather than in the order they arrived. A small order joining a level behind a large one is not guaranteed to be filled first, and may not be filled at all if the incoming order is small — the large order absorbs most of it because its share of the displayed size is larger. The consequence is that the two rules reward different behaviour, and the difference is biggest for the participants who are trying to earn the spread rather than cross it. Under price-time, the reward for being early is absolute, and a participant who is milliseconds faster captures the queue regardless of size — which is the mechanism behind the latency competition lesson M10 describes. Under pro-rata, speed matters less and **size matters more**, so a participant can be competitive without being first by quoting in larger size. That is why markets that use pro-rata tend to have larger displayed quotes at each level, and why the skills that win in one market do not transfer to the other. There is a further wrinkle that has become common in options and is worth naming: some venues offer a brief delay before an incoming order is exposed to resting quotes, intended to protect market makers from being picked off by the fastest participants. A delay like this is a structural feature of the venue rather than a data artefact, and it changes what “price-time priority” means on that venue — the fastest arrival is not automatically the first to interact with the book. For a learner the point is not to choose among these rules but to know that the rule is a variable. The same order sent to a different market gets a different queue, and the answer to “why did my order fill there” is often that the venue’s allocation rule, not the price, decided it. • Price-time rewards being early; pro-rata rewards showing size — and the two rules coexist in the same industry. • Under pro-rata, a small order can be skipped entirely by a large one on the same level. • Some venues insert an intentional delay before quotes are exposed, changing what priority means. • The allocation rule is a property of the venue, so the same order behaves differently across markets.
The shape of the book, and why displayed size is a weak signal
Once you can read a ladder, the temptation is to read it as a forecast. Take the displayed size on the bid and the displayed size on the ask over the first few levels, divide one by the other, and you have an **order-book imbalance** — a single number that is supposed to say which side is about to win. The honest version of what that number is worth is narrow. Imbalance has measurable predictive power over horizons of seconds to a couple of minutes on liquid instruments, and the effect decays quickly and is fragile to how the imbalance is defined: which levels count, whether hidden size is included, and whether the measure is an average over the last second or the state right now. For a learner trading hourly or on daily bars, the horizon over which the signal exists has already expired before the decision is made. The book is a tool for estimating your own execution cost, not for predicting where the price goes next. The reason to distrust it further is that displayed depth is partly an advertisement, and advertising is cheap to withdraw. **Layering** — posting several orders away from the touch to make one side of the book look heavier than it is, then cancelling when price approaches — has been the subject of a long series of enforcement actions since the 2010 Dodd–Frank Act made spoofing explicitly unlawful, and the pattern recurs because the incentive is real: a trader with a genuine order to fill benefits whenever another participant believes the false depth and stands aside. That does not mean most of the book is fake; it means the displayed size at prices away from the touch is a statement of intent, and intent can be revised in microseconds. The queue position you hold, by contrast, is contractual — the matching engine will serve your order in its turn — which is why the previous read drew its rule from position rather than from depth. What is more reliable is the record of what actually traded. Volume at price, the sequence of prints and which side was the aggressor tell you what participants paid, which is a fact rather than a claim; a bid that keeps refilling tells you either that a market maker is honouring a quote or that someone is accumulating, and only the tape’s volume distinguishes the two. A second reliable read is the behaviour of the book when it is tested: take out the displayed size at the touch and watch whether the next level holds or evaporates, because that response is executed intent. An iceberg that refills at the same price is a real participant; a book that thins away as soon as price arrives is a painted one. Reading the response rather than the snapshot is slower and far more useful, and it is the difference between using the book to size your own order and using it to guess the market’s. • Book imbalance predicts at horizons of seconds, and the effect is sensitive to how it is defined. • Displayed size away from the touch is intent, and intent can be cancelled before price arrives. • Layering and spoofing are unlawful precisely because false depth works on real participants. • The tape — volume at price and the aggressor — is a record; the book is a claim. • Test the book rather than reading it: take the touch and watch whether the next level holds. This is the same distinction the whole subject keeps returning to: information that costs money to produce is more trustworthy than information that is free to display. A resting order costs the poster queue position and the risk of being filled, while a quote that can be cancelled in microseconds costs almost nothing — and the book shows you both without labelling which is which.
What you'll practise
2,400 shares are resting ahead of your bid at $50.00. A 1,000-share market sell arrives. What happens to your order?
35 XP in the app · multi select
Sources
- Market structure and the limit order bookSEC — Equity market structure literature review
- Depth of book, price-time priority and order handling rulesNasdaq / NYSE — Exchange rulebooks
- Trading and Exchanges: Market Microstructure for PractitionersLarry Harris, Oxford University Press (2003)
Learn content is for education only — not individualized financial advice, a recommendation, or a solicitation to buy or sell any security. Options involve substantial risk. Examples are simplified and historical patterns never guarantee future results.