Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Market Microstructure
Order Book
Market Making
LabMarket making desk
Avellaneda–Stoikov
Glosten–Milgrom
Kyle Model
Spread Estimation
Connected Guides
  • The limit order book
  • Queue position and fill probability
  • Price impact and optimal execution

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Order Book

A live limit order book: see depth on both sides, send market orders that walk the book and track where your own limit order waits in the queue.

Random seed: 1

Order ticket

1,000
10020000
t = 0 s

Price ladder

BidsPriceAsks
100.11
100.10450
100.09451
100.08450
100.07450
100.06450
100.05450
100.04450
100.03take 100450
100.02take 450450
100.01take 450450
Mid 100.005 · spread 1 tick (1¢)
450100.00
44999.99
45099.98
45099.97
45099.96
45099.95
45099.94
45099.93
45099.92
45099.91

Point at an ask row to preview a market buy that takes everything up to it (a bid row: a sell). Click to send.

Book and fills

Best bid
100.00
Best ask
100.01
Depth within ±5 ticks
4,499
Levels hit by the preview
3
Average price
100.0165
Slippage
1.1 bp · $11.50

No market order sent yet. Send one from the ticket or click the ladder.

    Your place in the queue

    No resting order. Switch the ticket to Limit and click a ladder row.

    Your fills

    Why?

    Your bid at the touch finally fills. What usually happens to the price next?

    No fills yet. Market orders fill at once; resting limit orders fill when the crowd trades into them.

    Cumulative depth
    BidsAsks
    Slippage vs order size
    Market buys on this bookOrders you sentPreviewed order

    About this tool

    A limit order book is the list of all resting buy and sell orders for an asset, sorted by price. Buyers post bids below the market, sellers post asks above it, and the gap between the best bid and the best ask is the spread. Orders at the same price are filled in the order they arrived, which is called price–time priority. A market order trades immediately against the best resting orders and, if it is larger than the quantity at the best price, keeps eating into worse prices. This lab lets you build that picture by hand: send orders, watch the book react and see what each trade really cost you.

    Frequently asked questions

    What is price–time priority?

    It is the rule that decides who trades first. Orders with a better price always come first: the highest bid and the lowest ask. Among orders at the same price, the one that arrived earliest is filled first. That is why a trader who joins a busy price level late can wait a long time, or never be filled at all, even though their price is as good as everyone else's in that queue.

    What does it mean that a market order walks the book?

    A market order takes whatever liquidity is available, best price first. If you buy 500 shares and only 200 are offered at the best ask, the next 300 are bought at the next price levels up. Your average price is therefore worse than the best ask, and the larger the order relative to the depth of the book, the further it walks and the worse the average becomes.

    How is slippage measured?

    Slippage compares what you actually paid with a benchmark, usually the mid price before you traded: slippage = average fill price − mid for a buy, and mid − average fill price for a sell. Half the spread is the minimum you pay on any market order; anything beyond that comes from walking the book. In the lab, try the same order size on a deep book and on a thin one and compare the two numbers.

    Is a limit order always cheaper than a market order?

    Not necessarily. A limit order avoids paying the spread, but it may never be filled, and it tends to be filled exactly when the price is moving against you, because someone better informed chose to trade with it. The real comparison is the expected cost including the risk of missing the trade, which the queue part of the lab lets you explore.

    Learn the theory

    • The limit order book — Limit and market orders, price–time priority, depth, how a market order walks the book, and slippage measured against the mid price.
    • Queue position and fill probability — First-in, first-out queues at a price, how long a limit order waits, the chance it fills, why moving it costs priority, and why fills come before price moves.
    • Price impact and optimal execution — Temporary and permanent impact, the square-root rule of thumb, splitting a large order over time, and the Almgren–Chriss trade-off between cost and risk.