A Limit Order Book (LOB) is an electronic, real-time record of all outstanding, unexecuted limit orders for a specific financial asset, organized strictly by price level and time priority. It serves as the central matching engine for an exchange, displaying the aggregated quantity of shares or contracts available to buy at the bid and sell at the ask, thereby defining the instantaneous supply and demand curve.
Glossary
Limit Order Book (LOB)

What is a Limit Order Book (LOB)?
A foundational mechanism of modern electronic exchanges, the LOB organizes latent supply and demand to facilitate price discovery and automated trade execution.
The LOB is a dynamic, event-driven data structure updated by messages for order additions, cancellations, and executions. The highest bid and lowest ask form the inside market, and the gap between them is the bid-ask spread. Analyzing the depth and shape of the book beyond the best prices—known as order book imbalance—is a critical input for high-frequency forecasting models predicting short-term price movements.
Core Characteristics of a Limit Order Book
A Limit Order Book (LOB) is the fundamental data structure of modern electronic exchanges. It is a real-time, tick-by-tick record of unexecuted limit orders, organized by price level, that reveals the latent supply and demand for an asset.
Price-Time Priority
The primary matching algorithm governing most electronic LOBs. Orders are first ranked by price (best price gets priority) and then by time (earliest order at that price gets priority).
- Bid side: Higher prices have priority
- Ask side: Lower prices have priority
- A buy order at $100.05 placed at 10:00:00.000 executes before a buy order at $100.05 placed at 10:00:00.001
- This deterministic rule ensures fairness and discourages latency arbitrage at the queue level
Market Depth (Level 2 Data)
Market depth refers to the cumulative volume of limit orders resting at each price level beyond the best bid and offer. It visualizes the liquidity profile of the book.
- Level 1 data: Best bid, best ask, last traded price
- Level 2 data: Full order book depth, typically 5-10 price levels on each side
- Depth chart: A visual representation where the x-axis is price and the y-axis is cumulative volume
- A deep book with large resting orders at multiple levels signals high resiliency—the ability to absorb large market orders without significant price impact
Order Types and Lifecycle
A LOB manages the full lifecycle of diverse order types, each with distinct execution rules and cancellation policies.
- Limit Order: A commitment to buy/sell at a specified price or better. Rests in the book until filled or cancelled
- Market Order: An instruction to execute immediately at the best available price. Consumes liquidity; never rests in the book
- Iceberg Order: Displays only a small visible portion of the total quantity, replenishing automatically to conceal large trading intentions
- Fill-or-Kill (FOK): Must execute in full immediately or be cancelled entirely
- Immediate-or-Cancel (IOC): Executes any portion possible immediately and cancels the remainder
Liquidity Provision vs. Consumption
The LOB is a two-sided marketplace where makers provide liquidity and takers consume it, with fee structures incentivizing the former.
- Maker: Places a limit order that rests in the book, adding liquidity. Typically receives a rebate or pays a lower fee
- Taker: Submits a market or marketable limit order that matches against a resting order, removing liquidity. Pays a higher fee
- Maker-taker fee model: Common on exchanges like Coinbase and Binance, where makers pay 0.00%–0.02% and takers pay 0.04%–0.10%
- This economic incentive ensures tight spreads by rewarding those who quote competitively
Order Book Events and Updates
A LOB is not a static snapshot but a high-frequency event stream. Each change is broadcast as a discrete event, critical for algorithmic trading systems.
- Add: A new limit order is placed at a price level
- Modify: An existing order's quantity is changed (partial fill or manual adjustment)
- Cancel: An order is removed from the book before execution
- Execution/Trade: A match occurs between a taker and one or more makers, reducing resting quantity
- Exchanges like NASDAQ emit these events via ITCH and OUCH protocols at microsecond granularity, requiring event-driven architectures to process
LOB Imbalance and Predictive Signals
The shape and dynamics of the LOB encode predictive signals about short-term price movements. Quantitative researchers extract features from the book's state.
- Order Flow Imbalance (OFI): The net difference between aggressive buy and sell volume at the best bid/ask over a time window. High positive OFI predicts upward price pressure
- Bid-Ask Spread: A wide spread signals low liquidity and high adverse selection risk; a narrow spread signals a competitive, liquid market
- Queue position: The ordinal position of an order within a price level. Orders near the front of the queue have a higher fill probability
- Volume-synchronized probability of informed trading (VPIN): Uses LOB volume imbalances to estimate the presence of informed traders
Frequently Asked Questions
Clear, technical answers to the most common questions about the mechanics, data structures, and analytical use of limit order books in modern electronic markets.
A Limit Order Book (LOB) is an electronic, real-time record of all outstanding, unexecuted buy and sell orders for a specific financial asset, organized by price level and priority. It operates on a strict price-time priority matching algorithm. Bid orders (buy limit orders) are ranked from the highest price to the lowest, while ask orders (sell limit orders) are ranked from the lowest price to the highest. When a new aggressive market order arrives, it is immediately matched against the best available resting limit order on the opposite side. If a new limit order is not immediately executable, it is stored in the queue at its specified price level, with its position in the queue determined by the time of its arrival. The LOB is the core state machine of modern electronic exchanges like NASDAQ and the CME, replacing the human-mediated open outcry pit with a deterministic, auditable matching engine.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the essential components and dynamics that define the Limit Order Book, the central mechanism of modern electronic exchanges.
Price-Time Priority
The fundamental matching algorithm governing most electronic limit order books. Orders are first ranked by price—the highest bid and lowest ask have the highest priority. At the same price level, orders are ranked by time of arrival, rewarding the earliest order. This deterministic rule ensures fairness and incentivizes competitive pricing and early liquidity provision. Violations of price-time priority, such as those in some periodic auction models, create distinct market microstructure effects.
Market by Order vs. Market by Price
Two distinct data feed representations of LOB depth. Market by Order (MBO) provides full order-level granularity, showing every individual resting order, its unique ID, and its exact size. This is essential for order flow analysis. Market by Price (MBP) aggregates all orders at each price level into a single total volume. MBP is more compact and common for visualization, but MBO reveals the true queue dynamics and iceberg order detection.
Order Types
The LOB accepts a variety of instruction types beyond simple limit orders. Key types include:
- Market Order: Executes immediately against the best available opposite-side orders, consuming liquidity.
- Limit Order: A passive order to buy or sell at a specified price or better, providing liquidity.
- Iceberg Order: Displays only a small visible portion of the total quantity, concealing the full order size.
- Fill-or-Kill (FOK): Must be filled entirely and immediately or the entire order is cancelled.
Order Book Imbalance
A real-time metric quantifying the asymmetry between supply and demand at the top of the book. Calculated as (Bid Volume - Ask Volume) / (Bid Volume + Ask Volume) for the best N levels. A high positive imbalance indicates strong buying pressure and is a powerful predictor of short-term upward price movement. High-frequency market-making algorithms use imbalance signals to dynamically adjust quotes and manage inventory risk.
Queue Position Dynamics
The probability of a resting limit order being filled depends critically on its queue position at a given price level. Orders ahead in the queue are filled first. Traders use sophisticated models to estimate their queue position based on order book snapshots, trade prints, and cancellations. The value of a limit order decays as it loses queue priority, a concept central to optimal execution and market-making strategies.
LOB Data Normalization
Raw LOB data requires extensive preprocessing for machine learning. Steps include:
- Tick-level alignment: Synchronizing updates from multiple venues.
- Outlier filtering: Removing erroneous quotes far from the mid-price.
- Level standardization: Normalizing to a fixed number of price levels (e.g., 10 levels) for model input.
- Temporal resampling: Converting irregular event-time updates to fixed-interval snapshots for architectures like Temporal Convolutional Networks (TCNs).

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us