lesson 1 of 5
Order books and matching engines
Market microstructure is the study of how trading actually happens: who places orders, how they meet, and how prices emerge from that process. It explains why the price on a chart is not always the price you get.
The limit order book
On an exchange such as CME Globex, every futures contract has a central limit order book. It holds all resting buy orders (bids) and sell orders (asks) at each price. The highest bid and the lowest ask form the top of the book, and the gap between them is the spread. The quantity resting at each price is the depth.
A trade happens when an incoming order crosses the spread and meets a resting order on the other side.
Matching rules
The matching engine decides which resting orders fill first. Most CME equity index futures, including ES and NQ, use price-time priority, also called FIFO: the best price fills first, and at the same price, the order that arrived earliest fills first. Some other products use pro-rata allocation, which shares fills across orders at a price in proportion to their size.
Forex is different
Spot forex has no single central exchange. Prices come from a network of banks, non-bank liquidity providers and electronic communication networks (ECNs). Different brokers can show slightly different prices at the same moment, and some liquidity providers apply a 'last look' window in which they can reject an order after seeing it. Currency futures on CME, by contrast, trade on a central book like any other future.
Educational content only. Not financial advice.