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.

3:10 clip1:32:46–1:35:57 in the full courseWatch on YouTube

Transcript

38 sentences · select one to jump there

Check 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?

Choose one answer

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