What Is an Order Book?

Learn what an order book is, how bids and asks are matched, why spreads and depth exist, and how order-book design shapes trading and price discovery.

Sara ToshiMar 21, 2026
Summarize this blog post with:
What Is an Order Book? hero image

Introduction

Order book is the market structure most people have in mind when they picture an exchange: a live ledger of buyers and sellers waiting to trade at specific prices. It matters because this is the mechanism that turns many private trading intentions into one public market price, not once, but continuously. If you understand the order book, you understand why a market has a spread, why some trades move price more than others, why “liquidity” is more than a buzzword, and why speed and queue position can matter so much.

The central puzzle is this: if every trader wants a slightly different price, how does a market produce an executable price at all? The answer is not that the market somehow discovers a mystical “true value.” The answer is mechanical. The exchange keeps a structured list of standing buy and sell interest, then applies matching rules to that list. Price emerges from those rules.

That sounds simple, and at one level it is. But once you look closely, the order book is doing several jobs at once. It stores liquidity, ranks competing traders, exposes some information and hides other information, and decides when an incoming order should wait versus trade immediately. Those design choices shape everything from execution quality to market fairness.

Why do order books store standing buy and sell offers (what problem do they solve)?

At first principles level, an order book solves a coordination problem. In any market, buyers and sellers do not appear in perfectly matched pairs at the same instant with the same desired size and price. One trader may want to buy now, another may be willing to sell but only at a higher price, and a third may not arrive until a second later. Without some way to store and organize these intentions, trading would require constant bilateral negotiation.

The order book replaces that negotiation with a public queue of offers. On one side are bids: offers to buy at stated prices. On the other are asks: offers to sell at stated prices. Each order says, in effect, “I am willing to trade this amount at this price or better.” The exchange’s matching engine then checks whether any incoming order can trade against the best available orders already resting in the book.

This is why order-book markets are often called order-driven markets. The market price is not simply announced by a dealer. It is produced by the interaction of submitted orders. In many financial markets, and in a large share of electronic trading venues, this is the core matching mechanism.

The most important invariant is straightforward: better prices get priority over worse prices. If two orders offer the same price, a secondary rule decides which one goes first. On many venues, that rule is time priority: earlier orders at a given price stand ahead of later ones. Nasdaq market-model documentation describes this directly for continuous trading, where orders execute at the best available price and, among resting orders at the same price, are allocated by price then either time-priority or, for some products, pro-rata rules depending on the market. That detail matters because it tells you that an order book is not just a list of prices. It is a ranked queue.

How does an order book match incoming orders and form price?

The simplest useful picture is a ladder. The buy side contains prices below the current market; the sell side contains prices above it. The highest bid and the lowest ask form the top of the book. Their difference is the bid-ask spread. That spread is the immediate cost of crossing the market: if you want to buy right now, you usually trade at the ask; if you want to sell right now, you usually trade at the bid.

Now imagine a small book in a BTC-USD market. Suppose the best bid is 99,900 for 2 BTC and the best ask is 100,000 for 1 BTC, with more sell orders above that. If you submit a limit buy at 99,950, your order is better than the current best bid but still below the best ask. So it cannot trade immediately. Instead, it becomes the new best bid and waits. If you submit a market buy for 1.5 BTC, it will consume the 1 BTC offered at 100,000 and then continue into the next ask level until the full size is filled. The average price you pay may therefore be higher than the best displayed ask. That difference is part of what traders mean by slippage.

The mechanism is easier to see as a narrative. A seller has been waiting at 100,000 with 1 BTC. Another seller stands behind at 100,050 with 2 BTC. A buyer arrives and wants 1.5 BTC immediately. The matching engine does not ask everyone to renegotiate. It simply walks the ask side from best price upward, filling the cheapest available liquidity first. The first BTC trades at 100,000. The remaining 0.5 BTC trades at 100,050. The first seller is removed from the book because that resting order is fully executed; the second seller remains with 1.5 BTC still displayed. What changed was not “market sentiment” in some abstract sense. What changed was the inventory of standing offers.

That is the heart of price formation in an order book. Trades happen when an incoming order crosses the spread and consumes resting liquidity; prices move when the available liquidity at the best levels is exhausted.

What’s the difference between making liquidity and taking liquidity, and why does queue position matter?

RolePrice controlExecution certaintyCost/feesBest for
Maker (resting)Set execution priceMay not executeLower fees or rebatesPatient traders
Taker (aggressive)Accept displayed priceImmediate executionHigher taker feesUrgent execution
Figure 235.1: Maker vs Taker Orders: execution tradeoffs

This leads to a distinction that shows up everywhere in exchange design: some orders make liquidity and some take liquidity. A buy order posted below the best ask, or a sell order posted above the best bid, adds new resting interest to the book. It gives other traders something to trade against later. By contrast, an order that is aggressive enough to match immediately removes existing liquidity.

Why does this distinction matter? Because resting in the book gives you price control but not execution certainty. You can say, “I will only buy at 99,950,” but then you may never trade. Taking liquidity gives you execution now, but at the prices currently offered by others. This is the basic tradeoff every order-book trader faces.

Once a market uses price-time priority, a second tradeoff appears: queue position. If ten traders all want to buy at the same price, they are not equal from the matching engine’s perspective. The order entered first stands first in line. Later orders at the same price wait behind it. CME’s market-by-order documentation makes this very concrete: order-level feeds expose the individual queue and let a participant locate their own order in that queue using exchange-assigned anonymous identifiers. That visibility matters because execution probability depends not just on price, but on how much size is ahead of you.

This is a place where a smart reader can easily misunderstand the book. Seeing 100 BTC bid at a level does not tell you your chance of execution unless you know how that 100 BTC is composed. If it is one large order and you are behind it, your prospects differ from a case where it is many smaller orders and you already have priority. This is one reason market participants care so much about whether a data feed is market by price or market by order.

Price-depth vs order-depth: which book view tells you more about execution?

ViewShowsQueue visibilityBandwidthBest for
Market-by-Price (MBP)Total quantity per priceNo individual positionsLower bandwidthSnapshots and monitoring
Market-by-Order (MBO)Each order and sizeFull queue positionHigher bandwidthAlgorithmic execution
Figure 235.2: Market-by-Price vs Market-by-Order: feed tradeoffs

An order book can be represented at different levels of detail. The most compressed view is top of book: just the best bid and best ask. A richer view is price-depth, where quantity is aggregated at each price level. The most detailed public form is order-depth or market by order, where individual resting orders are shown separately.

FIX recommended practices describe this distinction explicitly. In price-depth, the feed reports total quantity available at each price level. In order-depth, each individual order is described so a client can reconstruct the full queue-level book. CME explains the practical consequence: market-by-order data lets users observe individual order sizes, queue position, and full depth, while market-by-price data compresses quantity at each level and does not let users determine individual queue positions with high accuracy.

The difference is not cosmetic. Aggregation changes what the market can infer. With only price-level totals, you know how much apparent liquidity sits at 100,000, but not whether that liquidity is one participant or fifty. With order-level data, you can study queue dynamics directly: which orders are added, canceled, refreshed, or partially filled. That improves transparency, but it also creates new strategic issues. CME notes, for example, that native iceberg orders can become more detectable under an order-level feed if refreshes preserve the same anonymous order identifier.

So the order book is not just one object. It is one underlying state that can be published in multiple views, depending on the venue’s design and the consumer’s needs.

Why is there a bid-ask spread and what does it reflect?

A common beginner intuition is that the spread is just a fee-like inconvenience. Mechanically, it is more fundamental. The spread exists because the highest currently willing buyer and the lowest currently willing seller are usually not the same person. If they were equal or overlapping, they would trade and disappear from the open book.

This means the visible spread is the book’s way of saying: “Here is the current gap between the best standing demand and the best standing supply.” In a deep, competitive market, that gap may be tiny. In a stressed or illiquid market, it may widen sharply because fewer participants are willing to stand close to each other in price.

The spread also reflects adverse-selection risk. If you rest a sell order at a given price, you may be trading against someone who knows something you do not. That possibility makes liquidity providers cautious. They do not quote infinitely tight prices out of kindness; they quote where they believe the compensation is worth the risk. The order book records the outcome of that collective calculation.

How does order-book depth affect liquidity and market impact?

The next level down from the spread is depth: how much quantity is available as you move away from the top of book. Depth is what determines how resilient the market is to larger trades. A narrow spread with almost no size behind it may look liquid from far away but behave poorly when a moderate order arrives.

This is why depth-of-market displays matter. They are direct readouts of the book’s supply and demand schedule, at least for displayed liquidity. If there are substantial resting sell orders just above the best ask, a market buy may move price only slightly. If the book is thin, the same order may sweep several price levels.

Research on order-book dynamics formalizes this intuition. In queueing-style models such as those studied by Cont, Stoikov, and Talreja, the visible book evolves as limit orders arrive, market orders consume queue size, and cancellations remove resting interest. Price movement is then a consequence of queue depletion and replenishment. The model is simplified and does not capture everything real traders do, but it isolates the mechanism clearly: short-term price changes often come from local imbalances in the queue, not from a fresh revelation of fundamental value every millisecond.

That point matters because people often speak about “the market price” as if it were a single stable object. In an order-book market, the executable price is conditional on size. For 0.01 BTC, the price may be the best ask. For 50 BTC, the relevant price is an average across many ask levels. The book therefore encodes not just a point price, but a whole liquidity curve.

How do data feeds and snapshots let you reconstruct the live order book?

In theory, the book is one authoritative state inside the exchange. In practice, traders see it through market-data feeds, and that creates implementation questions. Do you receive the whole book periodically, or only incremental changes? Are updates aggregated by price or sent per order? What happens if you miss messages?

The FIX book-management guide shows how operational these questions become. It distinguishes snapshots from incremental updates and recommends that initial snapshots be delivered with full-refresh messages, while subsequent maintenance occurs through explicit change, delete, or overlay instructions. It also warns that trade messages should not be used to reconstruct the book. That may sound surprising at first, but the logic is simple: a trade is an execution event, not a complete state-update instruction for every book representation. If you try to infer the book only from trades, you can easily produce inconsistencies.

This is one of the hidden complexities of electronic markets. The conceptual order book is easy to explain; maintaining an accurate live replica outside the exchange is much harder. Message sequencing, dropped packets, retransmissions, and asynchronous snapshots all matter. On high-speed multicast feeds, even recovering gaps can be operationally difficult, which is why standards discuss unique entry identifiers, price-level tags, and periodic refresh methods to help clients resynchronize.

Crypto venues face the same general problem through different interfaces. Exchange APIs commonly expose REST snapshots and WebSocket incremental updates, while institutional venues may provide FIX or other low-latency feeds. The details vary by venue, but the invariant is the same: the consumer must merge an initial state with ordered updates without losing consistency.

When do exchanges use continuous order books versus auctions, and why?

It is tempting to think an order book always works in one mode: continuous matching. Many markets do operate that way much of the time. During continuous trading, incoming orders are matched immediately whenever they cross with resting interest, and the best bid and ask update in real time.

But markets often switch modes when continuous matching would produce disorderly outcomes. Nasdaq documentation for derivatives markets is a useful example. In continuous trading, full market-by-order transparency may be disseminated. During opening, closing, or volatility auctions, however, individual orders may no longer be published in the same way; instead, the market can disseminate an auction imbalance indicator and compute a single equilibrium price for the uncross.

This is not a different philosophy of market design so much as a different solution to the same coordination problem. Continuous order books are good at processing asynchronous flow. Auctions are good at concentrating liquidity when the market needs a single clearing event, such as at the open, close, or after a volatility interruption. The contrast helps explain why a market would not rely on the visible continuous book alone in every circumstance.

What information does the order book actually show and what remains hidden?

An order book is a transparency mechanism, but not a perfect window into supply and demand. It reveals displayed interest, not necessarily total interest. Some orders may be hidden or partially displayed, as with iceberg-style functionality. Some liquidity may exist away from the public book entirely, in OTC negotiations, dark venues, or dealer systems. And some displayed liquidity is highly fleeting because participants can cancel quickly.

So when traders say “the book shows demand,” that is only partly true. It shows the demand currently expressed in executable displayed orders under that venue’s publication rules. That is useful, but narrower than total market willingness.

This distinction is one reason order books invite strategic behavior. A trader may post liquidity to gain queue position, then cancel if conditions change. Another may split an order across levels to shape how others read depth. At the abusive extreme, participants may submit orders not to trade, but to mislead others about supply and demand. The U.S. Department of Justice press release on a criminal conviction for commodity-futures market disruption is relevant here because it underscores that some order-book behaviors, such as spoofing-type manipulation, are not merely clever tactics but enforcement risks. The mechanism of an order book makes such tactics possible precisely because displayed orders influence beliefs before they execute.

That does not mean the order book is defective. It means any public signaling mechanism can be gamed if rules and surveillance are weak. Market design therefore has to balance transparency against strategic abuse.

How do centralized, off-chain relayer, and on-chain order-book designs differ in crypto?

DesignMatching locationThroughput / latencyFairness riskBest for
Centralized / Off-chainExchange matching engineHighest throughput, low latencyExchange discretion, internalizationHigh-frequency markets
On-chain CLOBOn blockchain (on-chain)Lower throughput, higher latencyMEV and priority auctionsComposability, on-chain settlement
Hybrid (relayer + on-chain)Off-chain match, on-chain settleModerate throughput and latencyRelayer trust, sequencing issuesBalance speed and finality
Figure 235.3: On-chain vs Off-chain vs Hybrid Order Books

In crypto, the basic order-book logic is the same, but where the book lives and where matching occurs can differ sharply. A centralized exchange typically maintains the canonical book inside its own matching engine and distributes market data outward. That looks structurally similar to traditional electronic venues, even if the APIs differ.

Decentralized designs split into several patterns. Some systems expose an order-book trading experience while matching off-chain and settling on-chain. Loopring is a clear example of this architecture: user assets remain protected by the rollup system, but order matching is performed by a relayer off-chain. The benefit is speed and throughput. The tradeoff is that fairness and matching quality depend partly on that relayer, because the protocol can constrain settlement rules without fully decentralizing the matching process itself.

Other systems have pursued more explicit on-chain central limit order books. Serum on Solana became a well-known reference point for this design direction, using the chain as the environment in which the order book itself is maintained. The attraction is stronger composability and more transparent shared state. The cost is that transaction ordering, throughput, and latency now interact directly with the chain’s execution environment.

Still other systems separate read and write paths in a hybrid way. dYdX documentation, for instance, distinguishes read-oriented data interfaces from authenticated transaction paths, reflecting a broader pattern in crypto exchange architecture: real-time order-book views may be served through specialized APIs or indexers even when the ultimate trade lifecycle depends on a blockchain-based system.

The deeper point is that an order book is a market logic, not a single infrastructure choice. The logic says: maintain ranked buy and sell interest and match according to explicit priority rules. That logic can be implemented in a centralized engine, an on-chain program, or a hybrid relayer-and-settlement design.

What new ordering and frontrunning risks do on-chain order books introduce?

Once an order book interacts directly with a public blockchain, transaction ordering becomes part of market structure. In a traditional centralized venue, the exchange’s matching engine decides sequence under its own rules. On-chain, inclusion and ordering may depend on validators, sequencers, or block builders, and that creates opportunities for frontrunning and other extractive behavior.

The research commonly referred to as Flash Boys 2.0 showed this vividly for decentralized exchanges: bots compete for transaction priority, often through fee bidding, to capture arbitrage and other opportunities. The term miner extractable value, now usually generalized to maximal extractable value, describes the value that can be captured through transaction ordering and inclusion choices. For order-book-like markets on-chain, this means queue priority is no longer only a function of the market’s matching rule. It can also depend on the consensus or block-production layer.

That is a profound change. In a standard price-time book, “first” is supposed to mean first into the venue according to venue time. On-chain, “first” may effectively mean first in the block, and block position may itself be auctioned. This weakens the clean intuition of price-time priority unless the system has additional protections.

Private orderflow systems and orderflow-auction protocols, such as those explored by Flashbots’ MEV-Share, are attempts to change who sees transactions before inclusion and who captures the resulting value. These systems are not order books themselves, but they matter because they alter the environment in which on-chain orders compete for execution priority.

Common misconceptions about order books and how to avoid them

The first likely misunderstanding is to treat the order book as if it were the market itself. It is better thought of as the current visible state of executable interest on one venue under one set of rules. The broader market may include other venues, hidden liquidity, and participants who have not yet submitted orders.

The second is to think that the displayed best bid and ask tell you “the price.” They tell you the smallest immediately executable prices for small size. For larger size, your effective price depends on depth and queue depletion.

The third is to assume that more transparency is always better. Order-level transparency can improve execution insight and confidence, but it can also expose strategic information, increase message volume, and make certain patterns easier to detect or exploit. CME’s comparison of market-by-order and market-by-price feeds captures this tradeoff well.

The fourth is to assume that the order book is a purely neutral mirror of supply and demand. It is not. It is supply and demand filtered through order types, visibility rules, matching priorities, cancellation rights, and data-feed design.

Conclusion

An order book is a ranked record of buy and sell orders that lets a market match traders continuously instead of forcing them into one-off negotiations. Its power comes from a simple mechanism: store standing offers, give better prices priority, and apply a rule for ties. From that, you get spreads, depth, queue position, market impact, and the continuous formation of price.

The idea to remember tomorrow is this: an order book does not discover price by opinion; it discovers price by matching rules applied to resting liquidity. Everything else (execution quality, transparency, manipulation risk, and even the difference between centralized and on-chain exchange design) follows from that mechanism.

How to improve your spot trade execution

Improve spot trade execution by reading the spread and depth, choosing between maker and taker orders, and sizing your order to shown liquidity. On Cube Exchange you can fund your account, inspect the order book depth, and place limit or market orders with explicit price and slippage controls to manage execution quality.

  1. Fund your Cube account with fiat on‑ramp or a supported crypto transfer.
  2. Open the market you want to trade and inspect the order book: note the bid-ask spread and the cumulative available size across the top 2–5 price levels for your intended trade size.
  3. Choose an order type: place a post-only or limit order at a price that stays inside the spread to add liquidity (maker), or use a market or aggressive limit that crosses the spread to take liquidity; set a max slippage or limit price before submitting.
  4. For orders larger than visible depth, split the trade into smaller limit slices or time-sliced orders and submit them sequentially; review estimated average fill and fees, then confirm each slice.

Frequently Asked Questions

Why didn’t my limit order execute immediately even though the price looked close to the best quote?
+
A limit order only executes immediately if it crosses the opposite side of the book (i.e., a buy at or above the best ask or a sell at or below the best bid); otherwise it becomes a resting order and waits its turn according to the venue’s priority rules (commonly price then time). Market orders and aggressive limit orders “take” liquidity and will walk the book until filled, which is why a single aggressive order can execute across multiple price levels. (Article)
How does my place in the queue affect whether my order gets filled?
+
Queue position determines your execution probability because many orders can aggregate at the same price but are matched in ranked order (often time-priority); knowing the total size at a price is insufficient without knowing how much is ahead of you. Market-by-order feeds and exchange order-level identifiers let participants estimate their place in the queue, while aggregated price-depth views hide that information and make execution chances harder to infer. (Article; CME/FIX docs)
What’s the practical difference between market-by-price and market-by-order data feeds?
+
Market-by-price (price-depth) aggregates quantity at each price level and hides individual order identities, reducing bandwidth and some informational detail; market-by-order (order-depth) reveals individual resting orders and queue positions, improving execution insight but increasing message volume and potentially exposing strategic information (for example, iceberg refresh behavior). Which view is better depends on the user’s needs and the venue’s tradeoffs. (Article; FIX/CME materials)
Why do exchanges sometimes run auctions instead of using the continuous order book?
+
Continuous matching processes incoming orders in real time and trades whenever orders cross the spread; auctions (open, close, or volatility auctions) instead accumulate orders and compute a single clearing price to concentrate liquidity and avoid disorderly continuous trades. Exchanges therefore switch modes when a single clearing event produces better price formation or when publishing full order-level transparency would be inappropriate during the auction. (Article; Nasdaq documentation)
How do on-chain order books differ from centralized exchange order books, and what new risks do they introduce?
+
On-chain order books obey the same matching logic but make transaction ordering and inclusion part of the consensus layer, which can create priority-extraction risks (MEV) because block builders, validators, or sequencers can influence who is effectively “first” in the queue. Off-chain relayer models trade throughput and speed for centralized matching control, while fully on-chain CLOBs gain composability at the cost of interacting directly with chain latency, ordering, and MEV pressures. (Article; MEV/crypto docs)
Is the bid-ask spread just an exchange fee or does it reflect something deeper?
+
The visible bid-ask spread is the gap between the highest standing buy and the lowest standing sell and therefore reflects the current difference between displayed demand and supply; it also compensates resting liquidity providers for adverse-selection and execution risk, so the spread widens when fewer participants are willing to quote close prices. Treating the spread as merely a fee ignores these mechanical and informational drivers. (Article)
Why is it hard to keep an accurate copy of the exchange order book from market-data feeds?
+
Reconstructing a live book off-exchange requires an initial snapshot plus ordered incremental messages; relying on trade messages alone is insufficient because trades are execution events and do not replace explicit create/change/delete book instructions, and asynchronous snapshots, missed packets, or retransmissions can produce inconsistencies if clients do not implement resynchronization logic. These operational details are why FIX and exchange guides specify snapshots, incremental updates, and gap-recovery behaviors. (Article; FIX guide)
Wouldn’t publishing every individual order always make markets better?
+
More pre-trade transparency improves visibility and execution insight but also raises costs and strategic risks: order-level feeds increase messaging and can make iceberg or refresh patterns detectable, which some participants may view as a disadvantage; therefore exchanges balance transparency against bandwidth, privacy, and manipulation concerns. (Article; CME/MBO guidance)

Related reading

Keep exploring

Your Trades, Your Crypto