Skip to content
Criée

Reading an order book

Spread, mid price, depth, and the effect of an incoming order computed level by level.

Lesson 211 min

By the end of this lesson

  • Read the best price on each side of an order book
  • Calculate the spread, mid price and depth of an order book
  • Calculate the average price of a market order that crosses several levels
In this lesson5

The order book is the screen a trader looks at before acting. Read properly, it tells you three things: at what price you can buy or sell right now, how much it costs to cross the market, and what an incoming order will cause.

What a book is

In the academic literature, the order book is "the set of all active orders in a market at time t", each order being described by a price, a size and a submission time (Gould et al., "Limit order books", 2013, section 2.1). On the BVMAC, securities trade in a central order book (BVMAC general regulation 2025, art. 131).

Order book

The set of active orders on a security at a given moment, split into two sides (buy, sell) and sorted by price.

Two sides facing each other. On the left, five green buyers’ crates; on the right, five coral sellers’ crates, of different lengths depending on the quantity offered. At the top, the two best prices: one hand on each side reaches towards the other, separated by a small gap, the spread.
An order book as a market stall: the best prices at the top, face to face

Reading both sides

The display groups orders by price. On the buy side, the best price is the highest; on the sell side, the lowest. The two best prices face each other at the top of the book.

A resting bookFictional

Buy: 40 shares at 10,000, 60 at 9,950, 100 at 9,900. Sell: 30 shares at 10,100, 50 at 10,150, 80 at 10,200.

Best bid b = 10,000. Best ask a = 10,100. Nobody trades: the most generous buyer does not pay as much as the least demanding seller.

Three measures can be read directly (Gould et al. 2013, section 2.1):

  • the spread s = a − b, here 10,100 − 10,000 = 100 XAF;
  • the mid price m = (a + b) / 2, here (10,100 + 10,000) / 2 = 10,050 XAF;
  • the depth at a price, the sum of quantities offered at that price: 60 shares at 9,950 on the buy side.

Writing aa for the best ask and bb for the best bid:

s=a−bm=a+b2s = a - b \qquad m = \frac{a + b}{2}

Spread

The gap between the best ask and the best bid. The narrower it is, the less it costs to buy and immediately sell again.

Depth

The total quantity offered at a given price on one side of the book. It shows how much can be traded before having to accept a worse price.

Predicting the effect of an incoming order

A market buy order first takes the best ask, then the next one as long as it still has shares to buy. Work it out before clicking: for 60 shares, how many trades, at what prices, and what new spread?

Effect of an incoming orderComputed by the @criee/marche engine

Book before the order

Buy

  • 10,00040
  • 9,95060
  • 9,900100

Sell

  • 10,10030
  • 10,15050
  • 10,20080
Spread
100
Mid price
10,050

Trades

·

The calculation for 60 sharesFictional

  1. 30 shares at 10,100 (the whole first sell level).
  2. 30 are still missing: they are taken at the next level, at 10,150.
  3. Total cost: 30 × 10,100 + 30 × 10,150 = 303,000 + 304,500 = 607,500 XAF, an average price of 607,500 / 60 = 10,125 XAF.
  4. The best ask becomes 10,150: the spread goes from 100 to 150.

A shallow book makes a large order expensive: that is the gap between 10,125 and the best displayed price of 10,100.

The life of an order that crosses the book

The same 60-share buy order, followed from the investor's home to its last trade. Every figure is recomputed by the portal's engine from the book above.

The life of a market order1/7

The order is born without a price

Awa wants 60 shares right away. She places a market order: she accepts whatever prices the book offers.

On this lesson's book, a 60-share market buy pays 10,125 XAF on average. By how much does this price exceed the mid price shown before the order?

Nuance: the price shown is not the price paid

Three mistakes come up often when reading a book.

  • Taking the mid price for a trading price. Nobody has offered 10,050: it is a computed reference point, not an offer. A buyer in a hurry pays at least the best ask a, a seller in a hurry receives at most the best bid b.
  • Reading the best price without looking at depth. The best price only holds for the quantity shown at that level. Beyond it, the order goes down the book.
  • Forgetting the empty book. If there is no order on one side, the spread and the mid price do not exist, and a market order on the other side finds nobody.

You saw in lesson 1 that a security is easier to resell the more liquid it is. The book makes this idea measurable: a narrow spread and good depth mean you can buy or sell without moving the price.

The cost of an immediate round tripFictional

On the resting book (best bid 10,000, best ask 10,100), you buy 20 shares then sell them straight back.

  1. Buy at the best ask: 20 × 10,100 = 202,000 XAF (30 shares are available at that price, 20 are enough).
  2. Sell at the best bid: 20 × 10,000 = 200,000 XAF (40 shares are bid at that price).
  3. Loss: 202,000 − 200,000 = 2,000 XAF, exactly the spread times the quantity: 100 × 20.
  4. For 60 shares you would have to go one level down on both the buy and the sell: the loss would be larger than 100 × 60.

The tick size, the smallest allowed gap between two prices, is set by a BVMAC instruction (BVMAC general regulation 2025, art. 133 and 166). Our sources did not find that instruction: the 50 XAF tick used here is fictional.

Without scrolling up: a book shows a best bid of 4,980 and a best ask of 5,020. What is the spread, and what is the mid price?

Your turn

On the sell side, the best price in the book is...

1On the sell side, the best price in the book is...

Best bid 2,450, best ask 2,500. The spread is...

2Best bid 2,450, best ask 2,500. The spread is...

Asks: 10 at 500, 40 at 510. A market buy of 30 shares pays on average...

3Asks: 10 at 500, 40 at 510. A market buy of 30 shares pays on average...

What does depth at a given price measure?

4What does depth at a given price measure?

Spread of 100 XAF, enough depth. Buying then immediately reselling 10 shares costs...

5Spread of 100 XAF, enough depth. Buying then immediately reselling 10 shares costs...

Read next: Gould et al., « Limit order books », Quantitative Finance, 2013

A question? Ask your teacher, or an AI assistant, giving it the title of this lesson.

Share:WhatsAppLinkedIn

Going further