Outcome
Move one historical Hyperliquid L4 snapshot workflow to 0xArchive and leave execution, account, and official venue control calls outside the migration.Prerequisites
- Identify one native workflow that reads historical market data.
- Separate market-data reads from execution, account, wallet, and venue-control operations.
- Choose one Hyperliquid family, symbol, timestamp, and output consumer.
- Load an API key from the runtime environment and check the selected symbol’s quality state.
Inputs
Steps
1
Mark the migration boundary
Move only the historical market-data read. Keep native execution, account state, wallet mutation, and official venue control operations in their existing authority.
2
Check the selected window
Check the exact family, symbol, data family, and timestamp with Data quality before replacing the old read.
3
Call the 0xArchive snapshot route
4
Adapt only the market-data consumer
Preserve the returned checkpoint and reconstruction metadata. A continuously updated local book still applies ordered diffs after a checkpoint; a snapshot-only consumer can use the returned state directly.
Expected state
The route returns an L4 snapshot object indata with checkpoint_timestamp, diffs_applied, last_block_number, bids, and asks. Individual resting-order rows use the documented L4 fields such as oid, user_address, side, price, size, and timestamp.
0xArchive performs collection, backfill, and reconstruction server-side for the returned snapshot. That removes collection work from this migration, but it does not remove the local checkpoint, ordered-diff, gap, or reconstruction obligation for a consumer that maintains continuously updated state.
Verification
Compare one old output and one 0xArchive output for the same family, symbol, timestamp, and depth. Record the route, query, snapshot timestamp, checkpoint timestamp, number of applied diffs, and request ID. Confirm that the consumer does not treat a snapshot as a continuous stream.Failure and recovery
- No usable coverage for the timestamp: stop the migration and choose a window shown by the selected route and quality response.
401: repair the key source or header.404: check the Hyperliquid namespace and symbol format.- A reconstruction or gap signal: discard unsafe local state, restart from the returned checkpoint, and apply ordered diffs only after the checkpoint.
- A mismatch with the old consumer: keep the old market-data path for comparison, inspect the exact route schema, and do not move execution or account calls into this workflow.