One order book per market
Each market keeps its own list of resting orders, sorted by price first and arrival time second: the best-priced order is always at the front, and among orders at the same price, the one that arrived first gets matched first. When a new order comes in, it’s checked against the opposite side of the book, buyers against sellers or vice versa, starting from the best-priced match and working outward, until either the new order is fully matched or nothing left on the book is willing to trade at a compatible price.Limit orders vs. market orders
These two behave differently once the matching pass finishes:- Limit orders that don’t fully match simply rest on the book, waiting for a future order to complete them, the same as a normal exchange order book.
- Market orders that don’t fully match are different: whatever portion didn’t find a match is simply dropped rather than left resting. A market order either fills against what’s currently available or it doesn’t, it never waits around.
