Skip to main content
aifinhub

Playground

Order Book Replay Visualizer

Drop a Level-2 CSV and watch the order book reconstruct tick by tick. Animated depth bars, best bid/ask, spread over time. Runs in your browser. Free.

Inputs
Paste + configure
Runtime
1–15 s
Privacy
Client-side · no upload
API key
Not required
Methodology
Open →

Education · Not investment advice. BaFin/EU framework. Past performance does not indicate future results. Editorial standards Sponsor disclosure Corrections

Load a Level-2 snapshot CSV

Wide format: one row per timestamp, columns for timestamp, bid_pxN/bid_szN, ask_pxN/ask_szN. Up to 20 levels per side supported. Everything runs in your browser — nothing is uploaded.

What this tool visualizes

Every snapshot in your CSV is rendered as two depth bars — green for bids (below mid), rose for asks (above mid). Bar length is proportional to size at that level. The dashed line is the mid.

The timestamp and quoted spread (absolute + basis points) update as you replay. Load the demo to see the shape; then bring your own L2 export from any of the vendors in theTCO calculator.

How to use

Step-by-step

Full calculator guide →
  1. 1

    Upload an ITCH or PITCH feed dump (NASDAQ or Cboe), or pick a pre-loaded sample day.

  2. 2

    Set the replay speed (real-time, 10x, 100x, or paused step-through) and aggregation level (tick / 1ms / 100ms / 1s).

  3. 3

    Watch the book reconstruction at the chosen aggregation. Step through events to inspect specific moments.

  4. 4

    Drop in your strategy's hypothetical order at any point and observe the simulated fill, queue position, and slippage.

  5. 5

    Compare with naive backtest assumptions (instant fills at midquote). The gap is your strategy's execution risk.

For agents

Use in an agent

Same math, same result shape as the UI above — as a static ES module. No HTTP request, no auth, no rate limit.

import { compute } from "https://aifinhub.io/engines/order-book-replay.js";

Contract: /contracts/order-book-replay.json Full agent guide →

Glossary references

Terms used by this tool

All glossary →

Questions people ask next

FAQ

Where does the historical order book come from?

The tool reads ITCH (NASDAQ) and PITCH (Cboe) feed dumps as documented on the methodology page. Polygon and Databento both sell historical level-2 data in these formats. The replayer reconstructs the limit order book from message sequences and steps through it tick-by-tick.

Can I replay any symbol?

Only symbols on exchanges that publish ITCH/PITCH feeds (NASDAQ, NYSE, Cboe). Off-exchange and dark-pool fills don't appear in the feeds. The methodology page lists which exchanges are supported. Symbols traded primarily off-exchange (some small-caps) have incomplete order-book reconstruction.

What's the time resolution?

Microsecond timestamps on the source data. The replayer can step at any aggregation: tick-by-tick (every message), 1ms, 100ms, or full-second snapshots. Tick-by-tick is appropriate for HFT-level analysis; coarser aggregations are faster for strategy prototyping.

Does it model exchange-specific protocols?

Yes for the listed exchanges. The methodology page documents the differences (e.g., NASDAQ's price-time priority vs. Cboe's price-display-time-priority, different cancel-replace conventions). Cross-exchange routing is not modeled — orders are simulated against a single venue's book.

How big a dataset can I replay?

1 trading day for SPY is roughly 100M messages and 5GB compressed. The tool supports streaming replay (no full load into memory) but is limited by your machine's I/O. Multi-day replay across many symbols is meaningful only with a serious dataset pipeline.

Complementary tools

Planning estimates only — not financial, tax, or investment advice.