Returns the L2 orderbook as it was at any historical timestampDocumentation Index
Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt
Use this file to discover all available pages before exploring further.
ts (microseconds since epoch). Reconstruction is exact — every order is replayed from the indexed event stream, not sampled from polled snapshots. Same response shape as the live /book endpoint, plus a history_starts anchor and an as_of timestamp.
Endpoint
:ts is a microsecond UNIX timestamp. ISO-string conversion: epoch_us = unix_seconds * 1_000_000.
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
side | int | both | 0 = Yes only, 1 = No only |
levels | int | 30 | Depth per side (max 200) |
Response
| Field | Description |
|---|---|
as_of | The timestamp the book was reconstructed for — exactly the :ts you passed |
reconstructed_at | When the request was processed (server-side now) |
resting_orders_count | Total live orders across all sides at :ts (sanity check) |
history_starts | Earliest event we indexed for this outcome — anchor for :ts validity |
warning | "ts is before the earliest indexed event ..." if :ts < history_starts, else null |
How it works
Every snapshot is a deterministic replay of the indexed event stream up to:ts. There is no sampling, no polling, no smoothing — if a fill happened one microsecond before your timestamp, the size is reflected; one microsecond after and it isn’t.
Use cases
- Pre-trade replay — feed
:ts = trade_time - 1µsto see exactly what book the trader saw before placing. - Slippage backtests — for any historical fill, compute realized vs theoretical at-time-of-decision.
- Liquidity migration analysis — chart top-of-book depth over time without polling.
- Forensics — investigate manipulation by reconstructing books around suspicious fills.
Examples
Notes
- Cost: ~50–200ms per request depending on
:tsand outcome activity. Costs grow with order activity in the window, not with how far back:tsis. :tsin the future returns 400.:tsbeforehistory_startsreturns an empty book with awarning. Both are intentional — no silent zeros.resting_orders_countis the truth check — when reconstructing AT NOW, it matches the live book exactly (verified byte-for-byte against/v1/markets/:id/book).- For high-frequency replay across many timestamps, prefer one large query window via
/v1/markets/:id/depth-history(coming soon) over many calls here. - This endpoint is rate-limited on your tier’s per-minute quota like all
/v1/*routes — heavy backtests should respect the limit.