Skip to content
Module 02 of 1255 min readMixed

Market microstructure

Order types (limit, market, stop, IOC, FOK), bid-ask spread, market depth, the price-discovery process every market is built around.

17%

Listen along

Read “Market microstructure” aloud

Plays in your browser using on-device text-to-speech — nothing leaves the page.

Learning objectives

By the end of this module, you should be able to:

  • 01Distinguish limit, market, stop, IOC, and FOK orders
  • 02Read a market depth display (level 2 order book)
  • 03Explain the bid-ask spread and how it relates to liquidity

Market microstructure is the plumbing of markets — order types, the order book, price-time priority, the matching engine. Every trader interacts with this plumbing every day; surprisingly few traders actually understand it. The ones who do gain real edge from execution alone.

Order types

  • Market order: 'buy now at whatever price is available'. Guarantees execution; doesn't guarantee price. Risks slippage in thin markets.
  • Limit order: 'buy at $100 or better' / 'sell at $105 or better'. Guarantees price; doesn't guarantee execution. May rest in the order book without filling.
  • Stop (stop-loss / stop-buy): 'when the price reaches $X, send a market order'. Used to limit losses or enter on breakout.
  • Stop-limit: 'when the price reaches $X, send a limit order at $Y'. More control over fill price but may not execute in fast-moving markets.
  • IOC (Immediate-Or-Cancel): execute available portion immediately; cancel the rest.
  • FOK (Fill-Or-Kill): execute the entire order immediately or cancel. Used for block trades that don't want partial fills.
  • GTD / GTC: Good-Til-Date / Good-Til-Cancelled — order persists until filled or the timeout.

The order book

text
Safaricom (SCOM) — order book snapshot
────────────────────────────────────────────────
BIDS (buyers) ASKS (sellers)
────────────────────────────────────────────────
Qty Price Price Qty
────────────────────────────────────────────────
50,000 17.40 17.45 32,000
25,000 17.35 17.50 80,000
100,000 17.30 17.55 45,000
80,000 17.25 17.60 120,000
200,000 17.20 17.65 300,000
────────────────────────────────────────────────
Best bid: 17.40 × 50,000 shares
Best ask: 17.45 × 32,000 shares
Bid-ask spread: 0.05 KES (0.29% of mid)
Mid-price: 17.425
A market BUY of 100,000 shares would clear:
32,000 @ 17.45 (best ask)
68,000 @ 17.50 (next level)
────────────────────────────────────────
Average price: 17.484 → 0.06 KES slippage vs mid
An order book makes the bid-ask spread, market depth, and slippage tangible. Every NSE / NYSE / FX trade sits inside this structure.

Bid-ask spread — what it pays for

Market makers post both a bid and an ask. They make money when buyers cross to the ask and sellers cross to the bid — earning the spread on each round trip. The spread compensates the market maker for: (1) inventory risk (the position they accumulate while waiting for the other side); (2) adverse selection (informed traders pick them off); (3) operating costs (technology, capital, fees). For a trader, the spread is the round-trip cost of trading. Tight spreads (1-2 bps on US large-cap equities) mean low cost; wide spreads (50+ bps on small-cap Kenyan equities) mean high cost.

Price-time priority

When orders match, exchanges use price-time priority: better-priced orders fill first; among orders at the same price, the order placed earlier fills first. This means market makers who post tight quotes early get preferential fills. HFT firms invest heavily in low-latency infrastructure precisely to be earlier in the queue at any given price.

Slippage and market impact

Slippage is the difference between your expected execution price and the price you actually got. For a market buy in a deep market, slippage is small (the spread). For a market buy of 5% of daily volume in a thin stock, slippage can be 1-5% of price — sometimes more. Professional traders break large orders into smaller pieces (execution algorithms — TWAP, VWAP, implementation shortfall) precisely to minimise market impact.

Exercise

You want to buy 200,000 shares of a Kenyan listed stock. Daily volume is 500,000 shares; bid-ask spread is 1%. Using the order book above as a model, walk through three execution strategies and their tradeoffs.

Key takeaways

  • Market order: buy/sell immediately at best price. Limit order: only fill at your price or better.
  • The order book is the live record of all open buy and sell intentions.
  • Bid-ask spread is the market maker's compensation — and the round-trip cost of trading.
Loading progress…
LeadAfrikPublic Economics Hub