Home > Topics > Financial Analytics > The Limit Order Book (LOB)

The Limit Order Book (LOB)

The Limit Order Book (LOB) is the central database that records all unexecuted buy and sell limit orders. It is the core of any modern exchange.

Anatomy of the Book

The book has two sides:

  1. Bid Side (Buy): People wanting to buy. Ordered High to Low. (Best Price = Highest).
  2. Ask Side (Sell): People wanting to sell. Ordered Low to High. (Best Price = Lowest).

The Touch

The gap between the Best Bid and Best Ask is the Spread.

  • Trades happen when someone crosses this spread (using a Market Order).

Order Types Impact on LOB

  1. Limit Order: "I want to buy at 99.00".
    • Effect: Adds liquidity. It sits in the book (at Bid side) waiting.
  2. Market Order: "I want to buy NOW at whatever price".
    • Effect: Removes liquidity. It eats the Best Ask (100.05). If the order is large, it consumes 100.05, then 100.10, etc. (This is Walking the Book).

Level 1 vs Level 2 Data

  • Level 1 (Top of Book): Shows only the Best Bid and Best Ask.
    • Example: Bid: 100.00 (Qty 50) | Ask: 100.05 (Qty 20).
  • Level 2 (Market Depth): Shows the top 5, 10, or 20 layers.
    • Allows you to see "walls" of support or resistance.
Note

LOB Imbalance: Traders watch the "Order Book Imbalance". If the Bid side has 100,000 qty and Ask side has 5,000 qty, it suggests upward pressure (Buying pressure).

Matching Logic (Price-Time Priority)

Most exchanges use FIFO (First In, First Out) logic.

  1. Price Priority: Highest Buy gets first preference. Lowest Sell gets first preference.
  2. Time Priority: If two people bid the same price (e.g., 100.00), the one who placed the order earlier gets filled first.

Loading quiz…