Order Book Simulator

Explore a synthetic order book. Simulate market buys and sells, watch available depth change, and compare the bid–ask spread. All prices and sizes are invented; no live feed or real orders.

PriceBid sizeAsk size

Synthetic book stats

Best bid
–
Best ask
–
Spread
–
Last trade
No fill yet
Units matched
0

How it works

  • Green bars = buy orders (bids)
  • Red bars = sell orders (asks)
  • Market buys consume asks; market sells consume bids
  • Dashed line = last fill, when inside the visible price window
  • Both sides use the same size scale; depth outside ±0.15 of midpoint is hidden

What is an Order Book?

An order book is a list of buy orders (bids) and sell orders (asks) for an asset, sorted by price. Exchanges use it to match buyers and sellers: when a bid price meets or exceeds an ask price, a trade is executed. The order book shows depth (how much size at each price) and the spread (gap between best bid and best ask).

How to Use This Simulator

  1. 1

    Watch the ladder

    Green bars are bids (buy orders), red bars are asks (sell orders). The chart updates as orders arrive and cancel.

  2. 2

    Use Play / Pause

    The book starts paused. Use Step for one random event or the market buttons for a 25-unit order. Play runs random additions, cancellations, and market orders.

  3. 3

    Adjust speed

    Change the speed slider to see more or fewer simulated events per second.

  4. 4

    Reset

    Reset pauses the simulation and seeds a fresh random book around 100.00. No trade has occurred until a market order fills.

Why Use an Order Book Simulator?

  • Learn price discovery – See how bids and asks interact to form the last trade price and spread.
  • Understand matching – A market buy consumes asks from the lowest price upward; a market sell consumes bids from the highest price downward. Requests larger than available depth fill only that depth.
  • See cancellations – Orders are removed when cancelled, changing depth without a trade.
  • Model boundaries – Price levels are aggregated. Queue priority, hidden liquidity, fees, and latency are omitted. These invented fills are not predictions of exchange execution.

Frequently Asked Questions

Is this live market data?

No. Prices and sizes are generated locally in your browser. There is no exchange feed, brokerage connection, or real order submission.

What do the market buy and sell buttons do?

Each requests 25 synthetic units. A buy consumes the lowest asks first; a sell consumes the highest bids first. If available depth is smaller, only that depth fills and the unfilled remainder is discarded.

Does this model exchange execution accurately?

It illustrates price-level matching, spreads, and cancellations. It does not model individual orders, queue priority, hidden liquidity, fees, latency, or a particular exchange’s matching rules. Simulated fills do not predict real fills.

Build Price and Volume Indicators

Pineify offers visual and AI-assisted Pine Script workflows. Review generated code and test it in TradingView. This simulator does not supply order-book data to Pine scripts or connect to a broker.

Explore Pineify