Replay and reconstruction are the right primitives when sequence, local state, gap handling, or order-book rebuilding matters more than a single response. Replay and reconstruction are stricter than ordinary historical pulls. If a model, chart, or strategy depends on event order, every message and request must carry enough metadata to reproduce the sequence.Documentation Index
Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
Use this file to discover all available pages before exploring further.
Choose The Primitive
| Need | Primitive | Start |
|---|---|---|
| One current snapshot | REST snapshot | Order Book Routes |
| Bounded historical pull | REST history | Historical Market Data |
| Event-order playback | WebSocket replay | WebSocket Replay |
| Local book maintenance | WebSocket channels and diffs | WebSocket L4 Order Book |
| Reconstruction helpers | SDK reconstruction | SDK Reconstruction |
| File-style rebuild | Data Catalog export plus schema metadata | Export Schemas |
Source Metadata
Every replay or reconstruction workflow should record:- venue family and symbol
- route, channel, or export schema key
- start and end time
- cursor or replay sequence
- snapshot source
- diff or event source
- gap, reconnect, and retry events
- data-quality result
meta.request_idwhere REST is involved
State Boundaries
Replay sends ordered historical events. Reconstruction turns a baseline plus ordered changes into local state. Keep those concepts separate in code and output labels. A replay file can be correct while a reconstruction is unsafe if the client applied messages out of order, ignored a gap, or rebuilt from the wrong snapshot.| Boundary | Record |
|---|---|
| Baseline | snapshot route, replay snapshot, checkpoint, timestamp, and request ID when REST is used |
| Updates | channel, diff source, cursor, replay window, and message order |
| Gap behavior | gap start/end, whether the run stopped, and rebuild decision |
| Output state | complete, partial, rejected, or rebuilt from a named checkpoint |
When Not To Use Replay
Do not use replay when a REST snapshot answers the question. Replay is heavier and stricter because sequence mistakes can silently corrupt local state. Use it when timing, causality, diffs, or historical event order are part of the product requirement. If the same workflow later moves from WebSocket replay into exported files, keep the replay metadata with the file output so the rebuild can be explained later.Minimal Run Manifest
Related Pages
WebSocket Backtesting
Replay historical windows for backtests and incident review.
SDK Reconstruction
Client-side reconstruction patterns and state handling.
Responses
Envelope, request ID, pagination, error, and parser rules.
Data Gaps
Treat gaps as data, not as parser noise.