Choose The Primitive
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.
State labels matter for downstream users. A chart can show a partial replay window, but a trading model or backtest should not treat partial reconstruction as clean input.
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.