Place buy and sell orders and watch them match by price-time priority, the same rules real exchanges use. This page runs a JavaScript port of the C++ engine, with the same order types and matching logic. Click a price in the book to fill in the ticket, or turn on simulated traders.
| id | side | price | remaining | queue position |
|---|
The best price fills first. At the same price, whoever arrived first fills first, so each level is a FIFO queue.
Every order id maps straight to its spot in its queue, so a cancel never scans the book. Price levels sit in a sorted map with the best price first.
Prices are stored in cents, not floats, so 100.10 + 0.20 is exactly 100.30. Trades print at the resting order's price.