Skip to content
MarketClueLearn

The Order Book and How Matching Works

Intermediate11 min readLesson 7 of 14

6 steps · one page

In short

The order book is the list of resting limit orders, arranged by price. It is the closest thing a market has to a visible mechanism, and reading it correctly requires knowing what is missing from it.

Scope. This article explains what an order book is, the rules by which orders are matched, and the several respects in which the book shows less than it appears to. MarketClue offers no order book display, no depth interpretation and no inference from either. It accepts, routes and executes nothing. Prices and quantities are small non-canonical illustrative figures describing no actual security. United States market structure, checked 17 August 2026.

The matching rule

Nearly all continuous markets match on price-time priority, and the two words are ranked in that order.

Price first. A better price is served before a worse one — the highest bid and the lowest ask trade first, regardless of when either arrived.

Time second. Among orders at the same price, the one that arrived earliest is served first. This is a queue, and position in it is determined by nothing but arrival.

What the queue does

Suppose three orders rest at one price, in the order they arrived.

OrderQuantityShares ahead of it in the queue
First3000
Second200300
Third500500

A fourth order joining now sits behind all 1,000 shares, and 1,000 shares must trade at that price before any of it fills.

Worked example — 400 shares arrive, and the same price produces three different outcomes. The first order fills completely at 300. The second fills 100 of its 200 — a partial. The third receives nothing at all. All three offered the identical price; the only difference between being filled, half-filled and ignored was when each arrived. Two consequences follow and neither is obvious from looking at a book. First, "there are 1,000 shares bid at that price" does not mean a seller of 1,000 will trade with those particular parties — it means the aggregate is 1,000, distributed across a queue whose order is invisible in the total. Second, a resting order's real prospect of filling depends on its queue position, which no display shows and which the holder cannot observe. MarketClue offers no queue-position estimate and no inference about fill likelihood. Figures are illustrative and describe no actual security.

Four things the book does not show

Hidden and reserve quantity. Many venues permit an order to display less than its full size. The visible quantity at a price can therefore understate what is actually available.

Stop orders. As Stop Orders and Stop-Limit Orders sets out, these are typically held away from the book and released only when triggered — so a quantity that will appear the instant a price is reached is not in the book beforehand.

Everywhere else. The book at one venue is not the market. Orders for the same security rest at several competing venues simultaneously, and which of them an order reaches is a routing question rather than a property of the security.

Anything about intent. The book records prices and quantities. It records nothing about why they are there or how long they will stay.

Worked example

Worked example

The property that matters most, and it undercuts most of what people do with a book. Displayed depth is revocable. A resting order is a standing offer that can be withdrawn at any moment before it is matched, so the book describes what participants are currently willing to do — not what will be there when an order arrives. And the withdrawal is most likely precisely when conditions change, because the same information that makes someone want to trade makes the party on the other side want to stop offering. So the depth visible in calm conditions is a poor guide to the depth available in the moment it would matter — which is the same structural asymmetry that appears in Limit Orders as adverse selection and in Order Duration and Time in Force as the ageing of a resting instruction. This portal draws no conclusion from any book state and offers no way to act on one.

How an incoming order interacts with it

A market order is matched against the best opposing prices in sequence until its quantity is complete, which is the book-walking arithmetic computed in Market Orders.

A limit order that crosses the opposing side is matched immediately, to the extent quantity is available at its limit or better. A limit order that does not cross joins the book and waits, taking its place at the back of the queue for its price.

That is the whole of the distinction between consuming and supplying immediacy, expressed mechanically: an order that crosses takes what is offered, and an order that rests becomes what is offered.

Frequently asked

8 questions

What is the order book?

The list of resting limit orders arranged by price. It is the closest thing a market has to a visible mechanism, and reading it correctly requires knowing what is missing from it.

How are orders matched?

On price-time priority, ranked in that order — a better price is served before a worse one regardless of arrival, and among orders at the same price the earliest arrival is served first.

Does queue position matter?

Substantially. In the illustration, 400 shares arriving against three resting orders fill the first completely, fill the second partially, and leave the third with nothing — all three offered the identical price, and the only difference was when each arrived.

Can I see my queue position?

No display shows it and the holder cannot observe it, which means a resting order's real prospect of filling depends on something invisible. This portal offers no queue-position estimate and no inference about fill likelihood.

Does the displayed quantity tell me what is available?

Not reliably. Many venues permit an order to display less than its full size, so visible quantity can understate what is there. Stop orders are typically held away from the book entirely and appear only when triggered.

Is one venue's book the whole market?

No. Orders for the same security rest at several competing venues simultaneously, and which an order reaches is a routing question rather than a property of the security.

What is the most important limitation?

That displayed depth is revocable. A resting order can be withdrawn at any moment before matching, so the book shows what participants are currently willing to do rather than what will be there when an order arrives — and withdrawal is likeliest exactly when conditions change.

What is the difference between an order that crosses and one that rests?

An order that crosses takes what is offered; an order that rests becomes what is offered. That is the distinction between consuming and supplying immediacy, expressed mechanically.

References

Educational and informational only — not investment advice, a recommendation, or an offer to buy or sell any security. Investing involves risk, including the possible loss of principal. Worked examples use fictional companies and figures.