Playground
Order Book Replay Visualizer
Drop a Level-2 snapshot CSV and replay the order book snapshot by snapshot. Animated depth bars, best bid/ask, spread and imbalance.
Runs in your browser. Nothing you enter is uploaded, and no account or API key is needed.
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 the TCO calculator.
How to use it
- The page opens with a 200-snapshot synthetic book. Load your own Level-2 CSV with Choose CSV.
- Use wide format: a timestamp column, then bid_px1, bid_sz1 … and ask_px1, ask_sz1 … for up to 20 levels per side.
- Press Play to step through the snapshots, set the speed, or drag the snapshot slider to jump to a moment.
- Read the quoted spread in basis points, the mid, the top-of-book imbalance and the size resting within 10 bps of mid for the current snapshot.
- Watch the depth bars through the replay to see where liquidity thins before you size an order.
Questions people ask
Where does the historical order book come from?
From you: the tool reads a CSV of Level-2 snapshots exported from your data vendor, one row per timestamp with a price and size for each level. It does not decode ITCH or PITCH message feeds or rebuild the book from individual messages. A synthetic demo book loads by default.
Can I replay any symbol?
Any symbol whose snapshots you can export in the CSV layout, up to 20 levels per side. The tool does not know the venue; coverage and accuracy are whatever your export contains.
What's the time resolution?
Whatever your snapshots have: the replay steps one snapshot at a time at 1 to 30 snapshots per second of playback, and timestamps in seconds or milliseconds are both read.
Does it model exchange-specific protocols?
No. It displays the snapshots as given. Queue position, priority rules, hidden liquidity and fills are not simulated; for an estimate of what an order would cost, use the Execution Simulator.
How big a dataset can I replay?
Everything runs in your browser, so the limit is the CSV your machine can parse comfortably, typically tens of thousands of snapshots. Nothing is uploaded.
Related pages
- Alternatives Databento Alternatives (2026)
- Alternatives Polygon.io (Massive) Alternatives (2026)
Related tools
- Playgrounds Pair Trading Cointegration Tester
Paste two price series. Engle-Granger cointegration test: OLS hedge ratio, Augmented Dickey-Fuller on residuals, Ornstein-Uhlenbeck half-life, z-score time series with configurable entry/exit bands. Everything client-side.
- Calculators Portfolio Correlation Matrix
Paste a multi-asset returns CSV. See the Pearson correlation heatmap, condition number, average absolute correlation, and eigenvalue concentration — the diagnostics for detecting redundant strategies before you allocate capital.
Articles
- 7 min read Almgren-Chriss Optimal Execution: A Worked Example
Almgren-Chriss optimal execution on a 250k-share sell: permanent and temporary impact, the mean-variance frontier and the cost at the 2005 calibration.
- 7 min read Binance vs Coinbase vs Kraken API 2026
Binance vs Coinbase vs Kraken API 2026 for bots: Binance 0.10% spot fees, Kraken 0.40%/0.80% entry tier, Coinbase rates behind sign-in, and rate limits.
- 7 min read CCXT vs Native Exchange APIs 2026
CCXT vs native exchange APIs 2026: CCXT normalizes 100+ exchanges in one codebase for multi-venue bots; native APIs win feature access and lowest latency.
Use it from code
The same calculation as a JavaScript module you can import. It runs where you import it, with no request, key or rate limit.
import { compute } from "https://aifinhub.io/engines/order-book-replay.js";