Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.
Replay stored Hyperliquid and Lighter market data over the WebSocket, in the order it happened, for backtests, local order-book rebuilds, and incident review. A replay request reads the stored records available when the request starts, emits the requested window, and completes with replay_completed. It does not continue following newly arriving events.Standard replay paces events by speed. L4 and full-depth replay instead uses checkpoint-anchored bulk delivery and ignores speed. Check live and replay availability before you choose a channel.
Replay one channel
This example replays the five minutes that ended one hour ago, a window every plan’s history reaches, including Free’s most recent 30 days. Replaying older history needs the full retained archive of Build or above.
const end = Date.now() - 60 * 60_000; // one hour agoconst start = end - 5 * 60_000; // five minutes earlierws.send(JSON.stringify({ op: "replay", channel: "orderbook", symbol: "BTC", start, end, speed: 10}));
start and end are Unix milliseconds. end is optional and defaults to now; replay_started reports the effective window and speed.
Replay several channels
Send a channels list instead of channel to replay several channels for one symbol on a single timeline. A multi-channel replay begins with a replay_snapshot for each channel, then interleaves events in timestamp order.
const end = Date.now() - 60 * 60_000; // one hour agoconst start = end - 5 * 60_000; // five minutes earlierws.send(JSON.stringify({ op: "replay", channels: ["orderbook", "trades", "funding"], symbol: "BTC", start, end, speed: 10}));
Keep every channel in one venue family. Do not combine Hyperliquid core channels with Lighter, HIP-3, HIP-4, or Spot channels in one command. The two Lighter deployments are separate replay families too: rh_lighter_* channels replay together, never with lighter_* channels. L4 and full-depth replay is single-channel.
const end = Date.now() - 60 * 60_000; // one hour agoconst start = end - 5 * 60_000; // five minutes earlierws.send(JSON.stringify({ op: "replay", channels: ["rh_lighter_orderbook", "rh_lighter_funding"], symbol: "BTC", start, end, speed: 10}));
L4 and full-depth replay
L4 replay is available on l4_diffs and l4_orders, and works the same way on the Spot, HIP-3, and HIP-4 L4 channels (spot_l4_diffs, spot_l4_orders, hip3_l4_diffs, hip3_l4_orders, hip4_l4_diffs, hip4_l4_orders) and on the full-depth orderbook_full and hip3_orderbook_full channels. Each run is single-channel.
const end = Date.now() - 5 * 60_000; // five minutes agoconst start = end - 2_000; // two seconds earlierws.send(JSON.stringify({ op: "replay", channel: "l4_orders", symbol: "BTC", start, end}));
The server anchors the run to the latest checkpoint at or before start, sends an l4_snapshot, then sends one or more l4_batch events for the window: pages of up to 5,000 order events in block order on the L4 channels, and price-level changes (side, px, sz, n, bn) in 100 ms windows of event time on the full-depth channels. Spot frames use the dashed pair symbol. For this bulk path, speed is ignored.Apply each batch in order after the snapshot to keep a local book current; a consumer that only needs one point in time can use the snapshot directly. The server collects, backfills, and anchors the data, but your client still applies the events. Bound the window and process batches off the message callback instead of using standard replay speed as backpressure.A request can be refused when no usable checkpoint exists for the symbol and window. Checkpoints start at 2026-03-11 01:03 UTC on Hyperliquid core and HIP-3 (full-depth channels included) and 2026-05-02 07:47 UTC on HIP-4. Spot checkpoints start at 2026-05-05 22:57 UTC for most pairs; PURR-USDC reaches back to 2026-03-11 01:03 UTC and HYPE-USDC starts at 2026-05-13 15:33 UTC. Treat the accepted replay events as the authority rather than assuming one L4 start date for every symbol.
Lighter replay
All six Lighter channels support historical replay, and Lighter on Robinhood Chain replays on its own five channels: rh_lighter_orderbook, rh_lighter_trades, rh_lighter_candles, rh_lighter_open_interest, and rh_lighter_funding. On Robinhood Chain, trades and candles replay from 2026-06-26 20:10 UTC; order books, open interest, and funding from 2026-08-22 18:43 UTC.Lighter replay returns historical_data rows in the stored Lighter shape, which differs from the live data payloads. Parse the two separately, or connect with version=2026-10-01 to receive replay rows in the live shapes. Trade replay on both deployments returns finalized trades only, up to meta.finalized_through. Lighter channels has a replay example for every channel.
Replay controls
Pause, resume, and stop work for both standard replay and L4 replay. replay.seek is standard-only and is rejected for L4 and full-depth replay, which also never use speed for pacing.
Pause
{"op":"replay.pause"}
Resume
{"op":"replay.resume"}
Seek
{"op":"replay.seek","timestamp":TIMESTAMP}
Stop
{"op":"replay.stop"}
For replay.seek, TIMESTAMP is a Unix-millisecond time inside the replay window, such as start + 60_000.
Replay events
Control commands use dotted op values, such as replay.pause. The events the server sends use underscore names, such as replay_paused.
Event
Meaning and what to do
replay_started
The window was accepted. Start the run manifest: record channel, symbol, start, end, and speed for standard timed replay. For L4 and full-depth replay, record delivery: checkpoint_anchored_bulk and checkpoint metadata instead
replay_snapshot
Initial state for a multi-channel replay. Build the baseline before processing historical_data; a single-channel standard replay starts with historical_data
historical_data
A standard replay record in timeline order. Apply it by channel and keep its timestamp
l4_snapshot
L4 or full-depth checkpoint state. Initialize the book before applying batches
l4_batch
L4 or full-depth events for part of the window. Process the array in order, off the socket callback
gap_detected
A missing or discontinuous interval. Mark the output incomplete, stop, or rebuild from a known checkpoint; for L4, also check batch block and order continuity
replay_paused
Replay paused after replay.pause. Keep state; the run clock stops
replay_resumed
Replay resumed after replay.resume. Continue from the current timestamp
replay_completed
The window ended. Close the manifest and label the output complete, partial, or rejected
replay_stopped
Replay stopped after replay.stop. Close the manifest as stopped and keep the reason
When a replay reports a gap, mark the derived output incomplete or rebuild from a safe checkpoint. Do not fill in missing market events.
Record a run manifest
Store a manifest beside every replay output so another run can explain the result. It is your application’s record, not part of the 0xArchive wire format.
Field
Record
Surface
WebSocket replay
Venue family and symbol
The exact family and symbol sent to the server
Channels
channel for a single-channel run, or the channels list
Window
start and the requested end, or the effective end from replay_started when end was omitted
Delivery
timed for standard replay, or checkpoint_anchored_bulk for L4 and full-depth replay
Controls
speed for standard replay, plus any pause, resume, seek, or stop commands; omit speed for L4
Baseline
replay_snapshot for multi-channel replay, or the l4_snapshot checkpoint metadata
Gaps and end state
Gap events, replay_completed or replay_stopped, and whether the output is complete, partial, or rejected
Code and output
SDK package and version or client revision, and where the output was written
Size and store a replay
Start with one channel and a narrow window. Widen only after the consumer keeps messages in order, writes output without a backlog, and handles gaps. Split long jobs into windows you can resume independently, and keep a checkpoint of your output between them.Use REST history instead when you need records from a bounded window and can order them after retrieval. Use replay when the sequence itself is the requirement: maintaining a book, testing a strategy against event cadence, or reproducing a stream.
Keep the anchor and warmup when rebuilding a book
Hyperliquid L4 replay starts from an eligible checkpoint at or before the requested start. Retain its last_block_number and apply the subsequent block/sequence batches after that snapshot; do not apply the anchor block again.The stream can include updates before your requested start to roll the checkpoint forward. Apply those updates to establish the book before scoring events in the study window. Keep reported gaps and the completion event with the saved run so a later replay can reproduce the same state.
Next step
Last modified on October 31, 2026
Was this page helpful?
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"0xArchive","description":"Hyperliquid and Lighter market data through the REST API, WebSocket, Webhook Alerts, and Bulk Exports. Start with your first request on the Free plan.","colors":{"primary":"#15803D","light":"#21C55E","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/logo-light.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=125ef51299181bd38460b33344f30ff5","dark":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/logo-dark.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=829b1f9b3638e20a5c6bc6032ab00025","href":"https://0xarchive.io/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=logo_home"},"favicon":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/favicon.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=df84c8913362b83bdf0443dd4b49a717","api":{"openapi":{"source":"openapi.json","directory":"api-reference"},"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true,"autogenerate":true},"url":"full"},"appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"https://0xarchive.io/pricing?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_pricing","label":"Pricing"},{"href":"https://0xarchive.io/status?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_status","label":"Status"},{"href":"https://0xarchive.io/changelog?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_changelog","label":"Changelog"},{"href":"https://github.com/0xArchiveIO","label":"GitHub"}],"primary":{"type":"button","label":"Dashboard","href":"https://0xarchive.io/dashboard?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_dashboard"}},"footer":{"socials":{"x":"https://x.com/0xarchiveIo","github":"https://github.com/0xArchiveIO","telegram":"https://t.me/archivedotio","linkedin":"https://www.linkedin.com/company/0xarchive"},"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://0xarchive.io/pricing?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_pricing"},{"label":"Status","href":"https://0xarchive.io/status?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_status"},{"label":"Data Catalog","href":"https://0xarchive.io/data?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_data_catalog"},{"label":"Dashboard","href":"https://0xarchive.io/dashboard?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_dashboard"}]},{"header":"Developers","items":[{"label":"Data rights","href":"/data-rights"},{"label":"AI clients","href":"/ai-clients"},{"label":"Coding agents","href":"/coding-agents"},{"label":"Choose an interface","href":"/tooling"}]},{"header":"Resources","items":[{"label":"Reference","href":"/reference"},{"label":"OpenAPI","href":"/openapi"},{"label":"Free crypto data API","href":"/free-crypto-data-api"},{"label":"Sitemap","href":"/sitemap"},{"label":"llms.txt","href":"/llms.txt"},{"label":"llms-full.txt","href":"/llms-full.txt"},{"label":"Resources","href":"https://0xarchive.io/resources?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_blog"}]},{"header":"Company","items":[{"label":"Home","href":"https://0xarchive.io/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_home"},{"label":"Contact","href":"https://0xarchive.io/contact?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_contact"},{"label":"Terms","href":"https://0xarchive.io/terms?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_terms"},{"label":"Privacy","href":"https://0xarchive.io/privacy?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_privacy"}]}]},"search":{"prompt":"Search routes, symbols, SDKs, WebSocket replay, and data quality"},"seo":{"metatags":{"canonical":"https://docs.0xarchive.io","og:site_name":"0xArchive Docs","og:type":"website","twitter:card":"summary_large_image","twitter:site":"@0xarchiveIo","google-site-verification":"Hpedp6bedqc3av1195euaGMwyFEVHcJhcyUY9YiMvTY"},"organization":{"id":"https://0xarchive.io/#organization","name":"0xArchive","legalName":"Archive Labs Inc.","url":"https://0xarchive.io/","logo":"https://0xarchive.io/logo-square-1024.png","sameAs":["https://x.com/0xarchiveIo","https://github.com/0xArchiveIO","https://t.me/archivedotio","https://www.linkedin.com/company/0xarchive/"]},"indexing":"all"},"fonts":{"family":"Geist","source":"fonts/geist-variable.woff2","format":"woff2"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"github-dark"},"latex":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"Open the quickstart, REST reference, or search the docs for the route you need."}},"contextual":{"options":["copy","view","assistant","chatgpt","claude","perplexity","cursor","vscode","windsurf","grok","devin","aistudio"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/0xarchive-e895b8e7/ZmnWL31Kq8lGIdPW/images/og-background.svg?fit=max\u0026auto=format\u0026n=ZmnWL31Kq8lGIdPW\u0026q=85\u0026s=802efd004c3811d20f873d5f00c5ef32"},"metadata":{"timestamp":true},"markdown":{"schema":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"0xarchive-e895b8e7","hasAudioNarration":false,"actualSubdomain":"0xarchive-e895b8e7","customDomains":["docs.0xarchive.io"],"gitSource":{"type":"github","owner":"0xarchiveio","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afc9f4a07f748c86f2884f0","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"REST API","count":505},{"language":"default","tag":"OpenAPI and schemas","count":242},{"language":"default","tag":"Operation schemas","count":237},{"language":"default","tag":"Endpoint reference","count":225},{"language":"default","tag":"HIP-3","count":104},{"language":"default","tag":"Hyperliquid core","count":104},{"language":"default","tag":"Terminal","count":96},{"language":"default","tag":"Lighter","count":60},{"language":"default","tag":"Webhook Alerts","count":53},{"language":"default","tag":"HIP-4","count":52}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","href":"/_mintlify/custom/0xarchive-e895b8e7/f5f5f3ca5c5101a6/styles.css"}],"page":{"pagePath":"websocket/replay","slug":"/websocket/replay","pageMetadata":{"title":"WebSocket replay","sidebarTitle":"Replay","description":"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.","href":"/websocket/replay"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const TaskCard=({title,description,href,action,secondaryHref,secondaryAction,tracking,facts=[],children})=>{const _components={a:`a`,..._provideComponents()};return _jsx(`div`,{className:`oxa-task-card-shell`,children:_jsxs(`section`,{className:`oxa-task-card`,\"aria-label\":title,children:[_jsxs(`div`,{className:`oxa-task-card__summary`,children:[_jsx(`p`,{className:`oxa-task-card__title`,children:_jsx(`strong`,{children:title})}),description\u0026\u0026_jsx(`p`,{className:`oxa-task-card__description`,children:description})]}),facts.length>0\u0026\u0026_jsx(`dl`,{className:`oxa-task-card__facts`,children:facts.map(({label,value})=>_jsxs(`div`,{className:`oxa-task-card__fact`,children:[_jsx(`dt`,{className:`oxa-task-card__label`,children:label}),_jsx(`dd`,{className:`oxa-task-card__value`,children:value})]},label))}),children\u0026\u0026_jsx(`div`,{className:`oxa-task-card__content`,children}),_jsxs(`div`,{className:`oxa-task-card__actions`,children:[_jsx(_components.a,{className:`oxa-cta oxa-task-card__primary`,href,\"data-oxa-cta\":tracking,children:action}),secondaryHref\u0026\u0026_jsxs(_components.a,{className:`oxa-task-card__secondary`,href:secondaryHref,children:[secondaryAction,_jsx(`span`,{\"aria-hidden\":`true`,children:` →`})]})]})]})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Table,_MdxComponentBoundary}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Replay stored Hyperliquid and Lighter market data over the WebSocket, in the order it happened, for backtests, local order-book rebuilds, and incident review. A replay request reads the stored records available when the request starts, emits the requested window, and completes with `,_jsx(_components.code,{children:`replay_completed`}),`. It does not continue following newly arriving events.`]}),`\n`,_jsxs(_components.p,{children:[`Standard replay paces events by `,_jsx(_components.code,{children:`speed`}),`. L4 and full-depth replay instead uses checkpoint-anchored bulk delivery and ignores `,_jsx(_components.code,{children:`speed`}),`. Check `,_jsx(_components.a,{href:`/websocket/channels#channel-reference`,children:`live and replay availability`}),` before you choose a channel.`]}),`\n`,_jsx(Heading,{level:`2`,id:`replay-one-channel`,children:`Replay one channel`}),`\n`,_jsx(_components.p,{children:`This example replays the five minutes that ended one hour ago, a window every plan’s history reaches, including Free’s most recent 30 days. Replaying older history needs the full retained archive of Build or above.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` end`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` Date.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`now`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`() `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// one hour ago`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` start`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 5`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// five minutes earlier`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`ws.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`send`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` op: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"replay\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` channel: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"orderbook\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` symbol: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"BTC\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` start,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` speed: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`10`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`}));`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`start`}),` and `,_jsx(_components.code,{children:`end`}),` are Unix milliseconds. `,_jsx(_components.code,{children:`end`}),` is optional and defaults to now; `,_jsx(_components.code,{children:`replay_started`}),` reports the effective window and speed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`replay-several-channels`,children:`Replay several channels`}),`\n`,_jsxs(_components.p,{children:[`Send a `,_jsx(_components.code,{children:`channels`}),` list instead of `,_jsx(_components.code,{children:`channel`}),` to replay several channels for one symbol on a single timeline. A multi-channel replay begins with a `,_jsx(_components.code,{children:`replay_snapshot`}),` for each channel, then interleaves events in timestamp order.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` end`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` Date.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`now`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`() `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// one hour ago`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` start`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 5`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// five minutes earlier`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`ws.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`send`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` op: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"replay\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` channels: [`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"orderbook\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"trades\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"funding\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` symbol: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"BTC\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` start,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` speed: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`10`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`}));`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Keep every channel in one venue family. Do not combine Hyperliquid core channels with Lighter, HIP-3, HIP-4, or Spot channels in one command. The two Lighter deployments are separate replay families too: `,_jsx(_components.code,{children:`rh_lighter_*`}),` channels replay together, never with `,_jsx(_components.code,{children:`lighter_*`}),` channels. L4 and full-depth replay is single-channel.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` end`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` Date.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`now`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`() `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// one hour ago`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` start`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 5`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// five minutes earlier`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`ws.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`send`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` op: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"replay\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` channels: [`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"rh_lighter_orderbook\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"rh_lighter_funding\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` symbol: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"BTC\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` start,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` speed: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`10`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`}));`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`l4-and-full-depth-replay`,children:`L4 and full-depth replay`}),`\n`,_jsxs(_components.p,{children:[`L4 replay is available on `,_jsx(_components.code,{children:`l4_diffs`}),` and `,_jsx(_components.code,{children:`l4_orders`}),`, and works the same way on the Spot, HIP-3, and HIP-4 L4 channels (`,_jsx(_components.code,{children:`spot_l4_diffs`}),`, `,_jsx(_components.code,{children:`spot_l4_orders`}),`, `,_jsx(_components.code,{children:`hip3_l4_diffs`}),`, `,_jsx(_components.code,{children:`hip3_l4_orders`}),`, `,_jsx(_components.code,{children:`hip4_l4_diffs`}),`, `,_jsx(_components.code,{children:`hip4_l4_orders`}),`) and on the full-depth `,_jsx(_components.code,{children:`orderbook_full`}),` and `,_jsx(_components.code,{children:`hip3_orderbook_full`}),` channels. Each run is single-channel.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` end`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` Date.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`now`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`() `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 5`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` *`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// five minutes ago`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` start`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 2_000`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// two seconds earlier`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`ws.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`send`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` op: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"replay\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` channel: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"l4_orders\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` symbol: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"BTC\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` start,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`}));`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The server anchors the run to the latest checkpoint at or before `,_jsx(_components.code,{children:`start`}),`, sends an `,_jsx(_components.code,{children:`l4_snapshot`}),`, then sends one or more `,_jsx(_components.code,{children:`l4_batch`}),` events for the window: pages of up to 5,000 order events in block order on the L4 channels, and price-level changes (`,_jsx(_components.code,{children:`side`}),`, `,_jsx(_components.code,{children:`px`}),`, `,_jsx(_components.code,{children:`sz`}),`, `,_jsx(_components.code,{children:`n`}),`, `,_jsx(_components.code,{children:`bn`}),`) in 100 ms windows of event time on the full-depth channels. Spot frames use the dashed pair symbol. For this bulk path, `,_jsx(_components.code,{children:`speed`}),` is ignored.`]}),`\n`,_jsx(_components.p,{children:`Apply each batch in order after the snapshot to keep a local book current; a consumer that only needs one point in time can use the snapshot directly. The server collects, backfills, and anchors the data, but your client still applies the events. Bound the window and process batches off the message callback instead of using standard replay speed as backpressure.`}),`\n`,_jsxs(_components.p,{children:[`A request can be refused when no usable checkpoint exists for the symbol and window. Checkpoints start at 2026-03-11 01:03 UTC on Hyperliquid core and HIP-3 (full-depth channels included) and 2026-05-02 07:47 UTC on HIP-4. Spot checkpoints start at 2026-05-05 22:57 UTC for most pairs; `,_jsx(_components.code,{children:`PURR-USDC`}),` reaches back to 2026-03-11 01:03 UTC and `,_jsx(_components.code,{children:`HYPE-USDC`}),` starts at 2026-05-13 15:33 UTC. Treat the accepted replay events as the authority rather than assuming one L4 start date for every symbol.`]}),`\n`,_jsx(Heading,{level:`2`,id:`lighter-replay`,children:`Lighter replay`}),`\n`,_jsxs(_components.p,{children:[`All six Lighter channels support historical replay, and Lighter on Robinhood Chain replays on its own five channels: `,_jsx(_components.code,{children:`rh_lighter_orderbook`}),`, `,_jsx(_components.code,{children:`rh_lighter_trades`}),`, `,_jsx(_components.code,{children:`rh_lighter_candles`}),`, `,_jsx(_components.code,{children:`rh_lighter_open_interest`}),`, and `,_jsx(_components.code,{children:`rh_lighter_funding`}),`. On Robinhood Chain, trades and candles replay from 2026-06-26 20:10 UTC; order books, open interest, and funding from 2026-08-22 18:43 UTC.`]}),`\n`,_jsxs(_components.p,{children:[`Lighter replay returns `,_jsx(_components.code,{children:`historical_data`}),` rows in the stored Lighter shape, which differs from the live `,_jsx(_components.code,{children:`data`}),` payloads. Parse the two separately, or connect with `,_jsx(_components.code,{children:`version=2026-10-01`}),` to receive replay rows in the live shapes. Trade replay on both deployments returns finalized trades only, up to `,_jsx(_components.code,{children:`meta.finalized_through`}),`. `,_jsx(_components.a,{href:`/websocket/lighter#replay`,children:`Lighter channels`}),` has a replay example for every channel.`]}),`\n`,_jsx(Heading,{level:`2`,id:`replay-controls`,children:`Replay controls`}),`\n`,_jsxs(_components.p,{children:[`Pause, resume, and stop work for both standard replay and L4 replay. `,_jsx(_components.code,{children:`replay.seek`}),` is standard-only and is rejected for L4 and full-depth replay, which also never use `,_jsx(_components.code,{children:`speed`}),` for pacing.`]}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Pause`,icon:`pause`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`{\"op\":\"replay.pause\"}`})})}),_jsx(Card,{title:`Resume`,icon:`play`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`{\"op\":\"replay.resume\"}`})})}),_jsx(Card,{title:`Seek`,icon:`skip-forward`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`{\"op\":\"replay.seek\",\"timestamp\":TIMESTAMP}`})})}),_jsx(Card,{title:`Stop`,icon:`square`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`{\"op\":\"replay.stop\"}`})})})]}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`replay.seek`}),`, `,_jsx(_components.code,{children:`TIMESTAMP`}),` is a Unix-millisecond time inside the replay window, such as `,_jsx(_components.code,{children:`start + 60_000`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`replay-events`,children:`Replay events`}),`\n`,_jsxs(_components.p,{children:[`Control commands use dotted `,_jsx(_components.code,{children:`op`}),` values, such as `,_jsx(_components.code,{children:`replay.pause`}),`. The events the server sends use underscore names, such as `,_jsx(_components.code,{children:`replay_paused`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`Meaning and what to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_started`})}),_jsxs(_components.td,{children:[`The window was accepted. Start the run manifest: record channel, symbol, start, end, and `,_jsx(_components.code,{children:`speed`}),` for standard timed replay. For L4 and full-depth replay, record `,_jsx(_components.code,{children:`delivery: checkpoint_anchored_bulk`}),` and checkpoint metadata instead`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_snapshot`})}),_jsxs(_components.td,{children:[`Initial state for a multi-channel replay. Build the baseline before processing `,_jsx(_components.code,{children:`historical_data`}),`; a single-channel standard replay starts with `,_jsx(_components.code,{children:`historical_data`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`historical_data`})}),_jsx(_components.td,{children:`A standard replay record in timeline order. Apply it by channel and keep its timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`l4_snapshot`})}),_jsx(_components.td,{children:`L4 or full-depth checkpoint state. Initialize the book before applying batches`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`l4_batch`})}),_jsx(_components.td,{children:`L4 or full-depth events for part of the window. Process the array in order, off the socket callback`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gap_detected`})}),_jsx(_components.td,{children:`A missing or discontinuous interval. Mark the output incomplete, stop, or rebuild from a known checkpoint; for L4, also check batch block and order continuity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_paused`})}),_jsxs(_components.td,{children:[`Replay paused after `,_jsx(_components.code,{children:`replay.pause`}),`. Keep state; the run clock stops`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_resumed`})}),_jsxs(_components.td,{children:[`Replay resumed after `,_jsx(_components.code,{children:`replay.resume`}),`. Continue from the current timestamp`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_completed`})}),_jsx(_components.td,{children:`The window ended. Close the manifest and label the output complete, partial, or rejected`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay_stopped`})}),_jsxs(_components.td,{children:[`Replay stopped after `,_jsx(_components.code,{children:`replay.stop`}),`. Close the manifest as stopped and keep the reason`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`ws.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`onmessage`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`event`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=>`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` msg`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`parse`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(event.data);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (msg.type `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` \"gap_detected\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` console.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`warn`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"Replay gap\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, msg.channel, msg.symbol, msg.gap_start, msg.gap_end);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When a replay reports a gap, mark the derived output incomplete or rebuild from a safe checkpoint. Do not fill in missing market events.`}),`\n`,_jsx(Heading,{level:`2`,id:`record-a-run-manifest`,children:`Record a run manifest`}),`\n`,_jsx(_components.p,{children:`Store a manifest beside every replay output so another run can explain the result. It is your application’s record, not part of the 0xArchive wire format.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Record`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Surface`}),_jsx(_components.td,{children:`WebSocket replay`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Venue family and symbol`}),_jsx(_components.td,{children:`The exact family and symbol sent to the server`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Channels`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`channel`}),` for a single-channel run, or the `,_jsx(_components.code,{children:`channels`}),` list`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Window`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`start`}),` and the requested `,_jsx(_components.code,{children:`end`}),`, or the effective end from `,_jsx(_components.code,{children:`replay_started`}),` when `,_jsx(_components.code,{children:`end`}),` was omitted`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Delivery`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`timed`}),` for standard replay, or `,_jsx(_components.code,{children:`checkpoint_anchored_bulk`}),` for L4 and full-depth replay`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Controls`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`speed`}),` for standard replay, plus any pause, resume, seek, or stop commands; omit `,_jsx(_components.code,{children:`speed`}),` for L4`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Baseline`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`replay_snapshot`}),` for multi-channel replay, or the `,_jsx(_components.code,{children:`l4_snapshot`}),` checkpoint metadata`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Gaps and end state`}),_jsxs(_components.td,{children:[`Gap events, `,_jsx(_components.code,{children:`replay_completed`}),` or `,_jsx(_components.code,{children:`replay_stopped`}),`, and whether the output is complete, partial, or rejected`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Code and output`}),_jsx(_components.td,{children:`SDK package and version or client revision, and where the output was written`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`size-and-store-a-replay`,children:`Size and store a replay`}),`\n`,_jsx(_components.p,{children:`Start with one channel and a narrow window. Widen only after the consumer keeps messages in order, writes output without a backlog, and handles gaps. Split long jobs into windows you can resume independently, and keep a checkpoint of your output between them.`}),`\n`,_jsx(_components.p,{children:`Use REST history instead when you need records from a bounded window and can order them after retrieval. Use replay when the sequence itself is the requirement: maintaining a book, testing a strategy against event cadence, or reproducing a stream.`}),`\n`,_jsx(Heading,{level:`2`,id:`keep-the-anchor-and-warmup-when-rebuilding-a-book`,children:`Keep the anchor and warmup when rebuilding a book`}),`\n`,_jsxs(_components.p,{children:[`Hyperliquid L4 replay starts from an eligible checkpoint at or before the requested start. Retain its `,_jsx(_components.code,{children:`last_block_number`}),` and apply the subsequent block/sequence batches after that snapshot; do not apply the anchor block again.`]}),`\n`,_jsx(_components.p,{children:`The stream can include updates before your requested start to roll the checkpoint forward. Apply those updates to establish the book before scoring events in the study window. Keep reported gaps and the completion event with the saved run so a later replay can reproduce the same state.`}),`\n`,_jsx(Heading,{level:`2`,id:`next-step`,children:`Next step`}),`\n`,_jsx(_MdxComponentBoundary,{name:`TaskCard`,children:_jsx(TaskCard,{title:`Make your replay useful beyond one run`,description:`Save the window, channel, baseline and gap state with your output, then prepare those records for a reproducible backtest.`,href:`/guides/point-in-time-backtesting`,action:`Prepare your backtest data`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{TaskCard,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"github-dark"},"config":{},"pageMetadata":{"title":"WebSocket replay","sidebarTitle":"Replay","description":"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.","href":"/websocket/replay"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[144,1363,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Replay one channel","slug":"replay-one-channel","depth":2,"children":[]},{"title":"Replay several channels","slug":"replay-several-channels","depth":2,"children":[]},{"title":"L4 and full-depth replay","slug":"l4-and-full-depth-replay","depth":2,"children":[]},{"title":"Lighter replay","slug":"lighter-replay","depth":2,"children":[]},{"title":"Replay controls","slug":"replay-controls","depth":2,"children":[]},{"title":"Replay events","slug":"replay-events","depth":2,"children":[]},{"title":"Record a run manifest","slug":"record-a-run-manifest","depth":2,"children":[]},{"title":"Size and store a replay","slug":"size-and-store-a-replay","depth":2,"children":[]},{"title":"Keep the anchor and warmup when rebuilding a book","slug":"keep-the-anchor-and-warmup-when-rebuilding-a-book","depth":2,"children":[]},{"title":"Next step","slug":"next-step","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/0xarchive-e895b8e7/7de7178c454c8311/analytics-delayed.js","/_mintlify/custom/0xarchive-e895b8e7/64d76990ea4d1101/ahrefs-analytics.js","/_mintlify/custom/0xarchive-e895b8e7/9c04a5e34ef7363a/assistant-ui.js","/_mintlify/custom/0xarchive-e895b8e7/ae934b733ebeac03/single-public-docs.js","/_mintlify/custom/0xarchive-e895b8e7/ab832e8be54292e5/webhooks-anchors.js"],"subdomain":"0xarchive-e895b8e7","siteName":"0xArchive","title":"WebSocket replay - 0xArchive","contextualStarterQuestions":[{"_id":"6af87e8b665dfb87d440de16","deploymentId":"69fcef8bc84766ada2de665b","questionText":"How do I replay WebSocket data?","status":"active","generatedBy":"contextual","path":"websocket/replay","createdAt":"2026-11-14T15:30:19.105Z","updatedAt":"2026-11-14T15:30:19.105Z","__v":0},{"_id":"6af87e8b665dfb87d440de18","deploymentId":"69fcef8bc84766ada2de665b","questionText":"Can I replay historical market data?","status":"active","generatedBy":"contextual","path":"websocket/replay","createdAt":"2026-11-14T15:30:19.105Z","updatedAt":"2026-11-14T15:30:19.105Z","__v":0},{"_id":"6af87e8b665dfb87d440de17","deploymentId":"69fcef8bc84766ada2de665b","questionText":"What speeds does replay support?","status":"active","generatedBy":"contextual","path":"websocket/replay","createdAt":"2026-11-14T15:30:19.105Z","updatedAt":"2026-11-14T15:30:19.105Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-14T15:30:09.130Z","gitLastModified":"2026-10-31T14:27:28.000Z","originalFileLocation":"websocket/replay.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\">\u003cmeta data-mint-head name=\"application-name\" content=\"0xArchive\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"WebSocket replay - 0xArchive\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"0xArchive Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.0xarchive.io/websocket/replay\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://0xarchive-e895b8e7.mintlify.site/_mintlify/api/og/v2?division=Channels+and+modes\u0026amp;title=WebSocket+replay\u0026amp;description=Replay+historical+0xArchive+WebSocket+streams+for+backtesting%2C+order-book+reconstruction%2C+incident+review%2C+and+deterministic+recovery.\u0026amp;theme=77376188720d2fe77317e930\u0026amp;signature=3903f31351a1ff6b2d3718130694954003dd0879e531c9bd03490b38e16c5005\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"WebSocket replay - 0xArchive\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://0xarchive-e895b8e7.mintlify.site/_mintlify/api/og/v2?division=Channels+and+modes\u0026amp;title=WebSocket+replay\u0026amp;description=Replay+historical+0xArchive+WebSocket+streams+for+backtesting%2C+order-book+reconstruction%2C+incident+review%2C+and+deterministic+recovery.\u0026amp;theme=77376188720d2fe77317e930\u0026amp;signature=3903f31351a1ff6b2d3718130694954003dd0879e531c9bd03490b38e16c5005\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"0xArchive\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#15803D\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"Hpedp6bedqc3av1195euaGMwyFEVHcJhcyUY9YiMvTY\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.0xarchive.io/websocket/replay\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/websocket/replay.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://0xarchive.io/#organization\",\"name\":\"0xArchive\",\"legalName\":\"Archive Labs Inc.\",\"url\":\"https://0xarchive.io/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://0xarchive.io/logo-square-1024.png\"},\"sameAs\":[\"https://x.com/0xarchiveIo\",\"https://github.com/0xArchiveIO\",\"https://t.me/archivedotio\",\"https://www.linkedin.com/company/0xarchive/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.0xarchive.io#website\",\"name\":\"0xArchive\",\"url\":\"https://docs.0xarchive.io\",\"publisher\":{\"@id\":\"https://0xarchive.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.0xarchive.io/websocket/replay#webpage\",\"url\":\"https://docs.0xarchive.io/websocket/replay\",\"name\":\"WebSocket replay\",\"description\":\"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\",\"dateModified\":\"2026-10-31T14:27:28.000Z\",\"isPartOf\":{\"@id\":\"https://docs.0xarchive.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.0xarchive.io/websocket/replay#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.0xarchive.io/websocket/replay#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Channels and modes\",\"item\":\"https://docs.0xarchive.io/websocket/channels\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebSocket replay\",\"item\":\"https://docs.0xarchive.io/websocket/replay\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.0xarchive.io/websocket/replay#article\",\"headline\":\"WebSocket replay\",\"name\":\"WebSocket replay\",\"description\":\"Replay historical 0xArchive WebSocket streams for backtesting, order-book reconstruction, incident review, and deterministic recovery.\",\"url\":\"https://docs.0xarchive.io/websocket/replay\",\"mainEntityOfPage\":{\"@id\":\"https://docs.0xarchive.io/websocket/replay#webpage\"},\"dateModified\":\"2026-10-31T14:27:28.000Z\",\"publisher\":{\"@id\":\"https://0xarchive.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.0xarchive.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"0xArchive\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"0xArchive\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/websocket/replay.md","siteName":"0xArchive","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"REST API","pages":[{"title":"REST API","href":"/rest-api"}]},{"tab":"WebSocket","pages":[{"title":"WebSocket API","sidebarTitle":"Overview","href":"/websocket"},{"group":"Connect","icon":"plug","pages":[{"title":"WebSocket connection and authentication","sidebarTitle":"Connection","href":"/websocket/connection"},{"title":"WebSocket keep alive","sidebarTitle":"Keep-alive","href":"/websocket/keep-alive"},{"title":"WebSocket limits","sidebarTitle":"Limits","href":"/websocket/limits"}]},{"group":"Channels and modes","icon":"radio","pages":[{"title":"WebSocket channels","sidebarTitle":"Channels","href":"/websocket/channels"},{"title":"Hyperliquid WebSocket API for Real-Time Market Data","sidebarTitle":"Real-time streams","description":"Use the 0xArchive WebSocket API for real-time Hyperliquid market data when event order and stream state matter.","href":"/websocket/real-time"},{"title":"WebSocket replay","sidebarTitle":"Replay","href":"/websocket/replay"},{"title":"WebSocket L4 order book","sidebarTitle":"L4 order book","description":"Use 0xArchive WebSocket and REST history together for L4 order-book reconstruction and gap-aware state.","href":"/websocket/l4-orderbook"},{"title":"Lighter WebSocket channels","sidebarTitle":"Lighter channels","href":"/websocket/lighter"},{"title":"Mempool channel","sidebarTitle":"Mempool","href":"/websocket/mempool"}]},{"group":"Message reference","icon":"braces","pages":[{"title":"WebSocket protocol reference","sidebarTitle":"Protocol reference","href":"/websocket/schema"},{"title":"WebSocket command schemas","sidebarTitle":"JSON schemas","href":"/websocket/json-schemas"}]}]},{"tab":"Webhook Alerts","pages":[{"title":"Webhook Alerts","href":"/webhooks"}]},{"tab":"Bulk Exports","pages":[{"title":"Bulk Exports","href":"/exports"}]},{"tab":"SDKs \u0026 Tools","pages":[{"title":"SDKs \u0026 Tools","href":"/tooling"}]},{"tab":"Terminal","pages":[{"title":"Terminal","href":"/terminal"}]}]},"basePath":"","title":"WebSocket replay - 0xArchive","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}