Skip to main content

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.

Real-time market data means live subscription behavior. Reach for it when REST snapshots and historical replay are the wrong primitives. Real-time WebSocket is the right surface when the application needs continuing updates: live dashboards, monitors, alerts, local order-book state, or agent workflows that watch a bounded market. Use REST when you need one response. Use WebSocket replay when the job needs historical stream order.

Real-Time Fit

NeedUse
Latest point-in-time snapshotREST order-book, trades, or summary routes
Continuing live updatesWebSocket subscription
Historical event orderWebSocket replay
Backtest input fileREST history or replay depending on sequencing
Freshness evidenceData-quality routes before trusting output

Subscription Design

1

Choose route family

Pick Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, or Lighter before choosing a channel.
2

Choose one channel and symbol

Start with the minimum channel-symbol pair that confirms the consumer can keep up.
3

Handle state changes

Track snapshots, updates, gaps, unsubscribe events, reconnects, and local state rebuilds.
4

Observe lag

Watch consumer lag, message queue depth, reconnect count, and gap events before widening.

Live Subscription Packet

Use this packet before opening or regenerating a live subscription.
FieldCapture
Venue familyCore, Spot, HIP-3, HIP-4, or Lighter
Channel-symbol pairOne channel and one symbol for the first run
ConsumerDashboard, alert, local book, model input, incident monitor, or agent task
Keep-alive policyPing interval, idle timeout, reconnect cap, and resubscribe behavior
Lag signalQueue depth, last message time, processing delay, and dropped UI updates
Exit pathUnsubscribe, close, retry budget, or fail-visible state

Real-Time Safety

Do not subscribe to every channel by default. A broad subscription set can create local backlog, stale UI, duplicate reconnect subscriptions, or incorrect local books even if the server accepts the connection. Record active subscriptions as application state, not as unreviewed prompt text. If an alert or model depends on a real-time stream, pair the stream with data-quality behavior. The stream client should know what to do when a gap appears, when reconnect occurs, or when freshness falls outside the job tolerance.

Agent Prompt Shape

Next Step

Use WebSocket Channels for channel examples, Keep Alive for reconnect behavior, and WebSocket L4 Order Book when the stream maintains order-level book state.
Last modified on May 18, 2026