Inferensys

Glossary

Limit Order Book (LOB)

An electronic record of all outstanding buy and sell orders for a specific financial instrument, organized by price level and time priority, maintained by an exchange's matching engine.
Developer reviewing semantic search engine results on laptop, relevance scores visible, technical search demo.

What is a Limit Order Book (LOB)?

The foundational data structure of modern electronic exchanges, representing the real-time aggregation of unfilled buy and sell orders for a specific financial instrument.

A Limit Order Book (LOB) is an electronic, real-time record maintained by an exchange's matching engine that lists all outstanding buy and sell orders for a security, organized by price-time priority. It serves as the definitive source of supply and demand, displaying the bid (buy) and ask (sell) queues at discrete price levels, where the highest bid and lowest ask define the current market.

The LOB's state evolves with every order submission, cancellation, or execution. Limit orders add liquidity by specifying a price ceiling or floor, while market orders consume liquidity by executing immediately against the best available resting orders. This dynamic, event-driven structure is the primary mechanism for price discovery in modern electronic markets.

MARKET MICROSTRUCTURE

Core Characteristics of a Limit Order Book

A Limit Order Book (LOB) is the foundational data structure of modern electronic exchanges, maintaining a real-time, prioritized queue of unexecuted buy and sell orders. Its architecture directly governs price discovery, liquidity dynamics, and the fairness of execution.

01

Price-Time Priority

The primary matching logic governing most Central Limit Order Books (CLOBs). Orders are ranked first by price aggressiveness and then by chronological entry time.

  • Best Bid/Offer: The highest buy price and lowest sell price define the market.
  • Queue Position: At a given price level, the oldest order has the highest execution priority.
  • Fairness Mechanism: This deterministic rule prevents discrimination and rewards market makers who commit capital early, forming the basis for price discovery.
O(n log n)
Typical Match Complexity
02

Bid-Ask Spread & Depth

The spread represents the instantaneous cost of a round-trip transaction. It is the difference between the best bid and best ask.

  • Inside Market: The highest bid and lowest ask constitute the inside market.
  • Depth of Book (DOB): The cumulative volume resting at price levels beyond the inside market, indicating the market's capacity to absorb large market orders without significant slippage.
  • Liquidity Signal: A narrow spread with deep book depth typically signifies a highly liquid, low-volatility environment.
< 1 cent
Typical Spread (Liquid Stocks)
03

Order Types & Visibility

Modern LOBs support complex order instructions beyond simple bids and offers to facilitate optimal execution and minimize information leakage.

  • Iceberg Orders: Display only a small peak of the total quantity, hiding the bulk to prevent signaling a large position.
  • Pegged Orders: Automatically adjust their price relative to a reference, such as the national best bid or the midpoint.
  • Post-Only Orders: Ensure the order is added to the book as a maker, never crossing the spread to take liquidity, thus qualifying for maker rebates.
04

Matching Engine Mechanics

The matching engine is the deterministic state machine that processes incoming orders against the resting book. It enforces the price-time priority rule set.

  • Atomic Operations: An incoming aggressive order is matched against the best contra-side price level. If volume remains, it sweeps to the next level.
  • Self-Match Prevention: Logic to prevent a trader from accidentally trading with themselves, which would generate unnecessary transaction costs.
  • Deterministic Latency: The processing time is critical; exchanges optimize this to nanoseconds to prevent latency arbitrage.
05

Market Data Feeds

The LOB generates a continuous stream of data that is disseminated to market participants, often in tiered service levels.

  • Level 1 (Top of Book): Provides only the best bid price, best ask price, and last traded price. Sufficient for basic price monitoring.
  • Level 2 (Depth of Book): Displays the full price ladder with aggregated order sizes at each level, essential for algorithmic execution.
  • Level 3 (Full Order Depth): Grants visibility into every individual order in the queue, often used for advanced market impact modeling and microstructure analysis.
06

Fragmentation & Routing

A single security rarely trades on a single LOB. Modern markets are fragmented across multiple exchanges and Alternative Trading Systems (ATS).

  • Reg NMS: In the U.S., this regulation requires brokers to execute at the best available price across all protected markets, preventing trading through a better quote.
  • Smart Order Routers (SORs): Algorithms that scan fragmented LOBs to find the venue with the highest fill probability and lowest total cost.
  • Consolidated View: A synthetic LOB can be constructed by aggregating the depth from all lit venues to understand true global liquidity.
MARKET MICROSTRUCTURE COMPARISON

LOB vs. Other Market Models

A structural comparison of the Central Limit Order Book against Request for Quote and Dark Pool execution mechanisms.

FeatureCentral Limit Order Book (CLOB)Request for Quote (RFQ)Dark Pool / ATS

Pre-Trade Transparency

Full depth of book visible

No pre-trade transparency

No displayed quotes

Price Discovery Mechanism

Continuous auction

Bilateral negotiation

Midpoint or reference price

Counterparty Identity

Anonymous

Disclosed to requester

Anonymous

Information Leakage Risk

High (visible intentions)

Medium (quote exposure)

Low (hidden intentions)

Typical Latency

< 10 microseconds

< 100 milliseconds

< 1 millisecond

Supports Hidden Orders

Regulatory Classification

National Securities Exchange

Broker-Dealer Protocol

Alternative Trading System

Primary Asset Classes

Equities, Futures, Options

Fixed Income, OTC Derivatives

Equities (Block Trades)

LIMIT ORDER BOOK ESSENTIALS

Frequently Asked Questions

Clear, technical answers to the most common questions about the structure, mechanics, and data science of electronic limit order books.

A Limit Order Book (LOB) is an electronic, real-time record of all outstanding, unexecuted buy and sell orders for a specific financial instrument, maintained and continuously updated by an exchange's matching engine. It operates as a transparent, price-time priority queue. When a trader submits a limit order, it is entered into the book at a specific price level; a buy order joins the bid side, and a sell order joins the ask side. The book is organized with the highest bid and lowest ask at the top. A trade occurs when an incoming marketable order is matched against a resting order in the book, removing liquidity. The LOB is the core mechanism for price discovery in modern electronic markets, aggregating supply and demand into a single, accessible data structure that reveals the full depth of market sentiment at any given moment.

Prasad Kumkar

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.