Module 6 · Interview Prep: A Stock Exchange Matching Engine Lesson 41 of 54
The Order Book
Bids and asks, a queue at every price, and an order that crosses two levels.
Transcript
38 sentences · select one to jump thereCheck your understanding
The best asks are 80 shares at $184.25, then 120 at $184.30. A limit buy for 250 shares at up to $184.30 arrives. What happens?
Lesson notes
The rule
Price-time priority lives in the data: sorted price levels, a first-in, first-out queue at each, and an ID lookup for instant cancels