Order book: how it works, and practice
A reconstructed order book on which you place market, limit, stop and stop-limit orders, and watch what becomes of them. Guided exercises set up situations where the choice of order type changes the outcome.
What an order book holds
The book gathers, at every instant, all the intentions to buy and sell that have not yet been executed. On one side buyers, ranked from the highest price to the lowest; on the other sellers, from lowest to highest. Between the two best offers sits the spread.
A trade happens when an order accepts the price on the other side. The last price displayed is therefore nothing but the trace of the last deal struck — not a price at which you are guaranteed to buy or sell.
Orders at the same price are filled in the order they arrived. That double rule, price then time, explains most of how a book behaves.
Four order types, four trade-offs
A market order executes immediately at the best price available. It guarantees execution, never price: in a thin book it can eat through several levels and end up well away from the last traded price.
A limit order sets a price not to exceed when buying, or not to go below when selling. It guarantees price, never execution: it waits in the book, and may wait indefinitely.
A stop order sleeps until the price reaches a threshold, then becomes a market order. It exists to get out of a position going wrong, at whatever price the market offers at that moment.
A stop-limit order combines the two: it triggers at the threshold, but becomes a limit order. It protects against an execution at an absurd price, at the risk of not executing at all — which is precisely what you were trying to avoid by placing it.
A simulated market, and why that is enough
Prices and the counterparty’s orders are produced by a simulator, not taken from a real market. No money is at stake, and nothing done here has any effect outside.
What the tool reproduces faithfully are the rules: price-time priority, partial fills, stop triggering, a large order eating through several levels. Those are what surprise beginners, and they do not depend on today’s prices.
Frequently asked questions
What is the difference between a market order and a limit order?
The first guarantees execution but not price; the second guarantees price but not execution. Everything else follows from that.
Does a stop order protect me from a sharp fall?
It triggers a sale when the threshold is crossed, but then executes at market: in a sudden fall, or at the open, the price obtained can be far below the threshold.
Are the prices real?
No, they are simulated. The execution rules are faithful, not the prices.