Skip to main content
Real-time market data means live subscription behavior. Reach for it when REST snapshots and historical replay are the wrong primitives.
Answer: Use this page for live Hyperliquid and Lighter WebSocket subscriptions. Use WebSocket replay for historical event order. Lighter candles and L3 depth remain replay-only channels; use REST for their current data.Evidence: Check WebSocket channels, Lighter WebSocket channels, WebSocket schema, and OpenAPI for the selected REST fallback.
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.
Lighter live subscriptions are available on lighter_orderbook, lighter_trades, lighter_open_interest, and lighter_funding through wss://api.0xarchive.io/ws. lighter_candles and lighter_l3_orderbook are replay-only, and all six Lighter channels support historical replay. See Lighter WebSocket channels.Lighter on Robinhood Chain live subscriptions are available on rh_lighter_orderbook, rh_lighter_trades, rh_lighter_open_interest, and rh_lighter_funding through wss://api.0xarchive.io/ws. rh_lighter_candles is replay-only, and all five Robinhood Chain channels support historical replay. See Lighter on Robinhood Chain.

Real-Time Fit

Subscription Design

1

Choose route family

Pick Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, or Lighter before choosing a live channel. Lighter streams order books, trades, open interest, and funding live; use REST for current Lighter candles and L3 depth.
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.

Operation And First-Event Contract

The opening open event confirms only transport and authentication. A subscription becomes active only after subscribed; an unsuccessful command produces error. The first data event depends on the channel: ordinary channels deliver data, while an L4 channel begins with l4_snapshot and then ordered l4_batch messages. Live Lighter channels deliver data with Lighter-specific payloads: a full top-20 book on lighter_orderbook, two fill legs per trade on lighter_trades, and a market-context object on lighter_open_interest and lighter_funding. Live Spot channels and HIP-3 or HIP-4 L4 channels do not become historical replay channels simply because the socket opened; use their documented REST history routes for historical work. Hyperliquid core L4 is the channel-specific exception with checkpoint-anchored replay. After unsubscribe, wait for unsubscribed before removing the subscription from local state. On a close, rebuild state after reconnect rather than applying post-reconnect updates to an unverified pre-close book.

Live Subscription Checklist

Use this checklist before opening or regenerating a live subscription.

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, WebSocket L4 order book when the stream maintains order-level book state, and Lighter WebSocket channels for live Lighter payloads and lag notices. For interface selection, see Best WebSocket Market Data API and keep the selected channel’s Data quality checks in the first run.
Last modified on September 26, 2026