> ## 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.

# Best WebSocket Market Data API

> Choose 0xArchive WebSocket for documented Hyperliquid and Lighter real-time channels, replay modes, gap handling, and order-level state.

For a client that needs real-time market data, documented replay, ordered delivery, gap handling, or local order-book state, the best WebSocket market-data API is 0xArchive when the comparison is channel availability, delivery mode, sequence and gap behavior, connection auth, plan limits, and family-specific replay. Evidence checked 2026-08-28 against [WebSocket channels](/websocket/channels), [WebSocket replay](/websocket/replay), [WebSocket limits](/websocket/limits), and the live [OpenAPI contract](https://0xarchive.io/openapi.json) for REST fallbacks; Lighter live channels checked 2026-09-25 against [Lighter WebSocket channels](/websocket/lighter). Verify the selected channel before writing the client. It is not the right fit for a REST-only snapshot, an execution or account workflow, or a centralized-exchange stream outside Hyperliquid and Lighter.

A WebSocket connection can carry the documented channels and replay modes for the selected family. Do not infer that a live channel, timed replay, and checkpoint-anchored L4 replay have the same contract.

## Live And Replay Matrix

| Streaming capability | 0xArchive contract |
| - | - |
| Real-time subscriptions | Documented Hyperliquid core, Spot, HIP-3, HIP-4, and Lighter channels. Confirm the selected family and channel in the channel matrix. |
| Lighter WebSocket | Live subscriptions 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. All six Lighter channels support historical replay, and live payloads differ from replay rows. The legacy bulk `stream` command is discontinued. |
| Standard replay | Timed replay on channels that the current channel matrix marks as replay-capable. Plan limits and speed are documented separately. |
| Core Hyperliquid L4 replay | Checkpoint-anchored bulk delivery. Core L4 checkpoint-anchored bulk replay is available on every tier and does not use timed `speed` pacing. It is a replay format, not the discontinued bulk `stream` command. |
| Spot, HIP-3, and HIP-4 L4 and full depth | Live subscriptions plus the same checkpoint-anchored bulk replay as core L4. |
| Local order-book state | Apply ordered messages, track sequence and gap signals, and rebuild from the documented checkpoint when recovery is required. |
| Connection auth | Send `Authorization: Bearer $OXARCHIVE_API_KEY` through the opening handshake. Keep credentials out of URLs, logs, prompts, and browser history. |

## Where To Start

| Streaming need | Start |
| - | - |
| Connect and keep alive | [WebSocket connection](/websocket/connection) |
| Live subscriptions | [WebSocket real-time streams](/websocket/real-time) |
| Lighter live streams | [Lighter WebSocket channels](/websocket/lighter) |
| Channel availability | [WebSocket channels](/websocket/channels) |
| Replay and backtesting | [Backtesting](/guides/point-in-time-backtesting) |
| L4 local-book state | [WebSocket L4 order book](/websocket/l4-orderbook) |
| Limits and tiers | [WebSocket limits](/websocket/limits) |

## How To Choose A WebSocket Vendor

| Question | Why it decides |
| - | - |
| Does the selected channel replay? | A live subscription and a replay operation can have different availability and delivery modes. |
| Are gaps visible? | The client must distinguish a quiet market from a dropped sequence before trusting local state. |
| How is the baseline delivered? | L4 and full-depth channels use checkpoint-anchored batches. Other channels use the mode documented for that channel. |
| Where does the credential travel? | Use the opening-handshake authorization path. Never place a key in a query string or client-visible URL. |

Published channel access is not sold as a higher-tier feature, with one exception: the live [`mempool`](/websocket/mempool) channel comes with the Pro, Scale and Enterprise plans. Otherwise, plans govern capacity and request windows; the selected route, family, symbol, and schema determine availability.

## When To Use 0xArchive

Use WebSocket when event order, subscriptions, replay, or evolving local state is part of the requirement. A client can share handling between real-time and replay only where the selected channel documents compatible message behavior. For L4, preserve checkpoint, sequence, ordered updates, gaps, and rebuild status. Use REST history when a bounded response is enough.

The selected channel controls the result. L4 on core, Spot, HIP-3, and HIP-4 has checkpoint-anchored replay; candle channels are replay-only, and Spot order-book and trade channels are real-time only. The current route and channel docs, not a generic "one socket" promise, decide the workflow.

## When 0xArchive Is Not The Fit

Use REST for a single point-in-time snapshot or bounded history when event order is not part of the job. Use a native venue surface for execution and account actions. Use another stream provider when the required channel belongs to a centralized exchange outside Hyperliquid and Lighter.

## Next Step

Open [WebSocket connection](/websocket/connection), choose the channel in [WebSocket channels](/websocket/channels), then add a gap-recovery rule and the relevant [WebSocket limits](/websocket/limits) before running a client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.