WebSocket Channels

Pick the channels, mode limits, and book depth before you design the consumer.

Modes
Live and replay
Depth
L4 and venue-specific channels

Channels

Channel matrix

Compare venue coverage, live versus replay support, and tier gates before you subscribe.

Hyperliquid

Historical data from April 2023. Symbols: BTC, ETH, SOL, etc.

ChannelDescriptionModeTier
orderbookL2 order book snapshots (~1.2s resolution)Real-time & HistoricalBuild+
tradesTrade/fill updates (pre-March 2025 fills are taker-only)Real-time & HistoricalBuild+
candlesOHLCV candles. Interval param: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1wHistorical only (May 2025+)Build+
open_interestOpen interest snapshotsHistorical only (May 2023+)Build+
fundingFunding rate snapshotsHistorical only (May 2023+)Build+
liquidationsLiquidation eventsHistorical only (December 2025+)Build+
tickerPrice and 24h volumeReal-time onlyBuild+
all_tickersAll market tickers at once (no symbol param needed)Real-time onlyBuild+
l4_diffsL4 orderbook diffs with user wallet attribution. Batched by block (~100ms).Real-time onlyPro+
l4_ordersOrder lifecycle events (new, partial fill, filled, cancelled) with wallet attribution. Batched by block.Real-time onlyPro+

HIP-3

Builder-deployed perpetuals on Hyperliquid. Data from December 2025. Symbols: km:US500, hyna:BTC, etc.

ChannelDescriptionModeTier
hip3_orderbookL2 order book snapshotsHistorical onlyPro+
hip3_tradesTrade/fill updatesHistorical onlyBuild+
hip3_candlesOHLCV candles. Interval param: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1wHistorical onlyBuild+
hip3_open_interestOpen interest snapshotsHistorical onlyBuild+
hip3_fundingFunding rate snapshotsHistorical onlyBuild+
hip3_liquidationsLiquidation events with long/short directionHistorical onlyBuild+
hip3_l4_diffsL4 orderbook diffs with user wallet attribution. Batched by block (~100ms).Real-time onlyPro+
hip3_l4_ordersOrder lifecycle events with wallet attribution. Batched by block.Real-time onlyPro+

Lighter.xyz

Data from August 2025 for fills and January 2026 for orderbook / OI / funding. Symbols: BTC, ETH, SOL, etc.

ChannelDescriptionModeTier
lighter_orderbookFull-depth order book. Granularity param: checkpoint, 30s, 10s, 1s, tickHistorical onlyBuild+
lighter_tradesTrade/fill updatesHistorical onlyBuild+
lighter_candlesOHLCV candles. Interval param: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1wHistorical onlyBuild+
lighter_open_interestOpen interest snapshotsHistorical onlyBuild+
lighter_fundingFunding rate snapshotsHistorical onlyBuild+
lighter_l3_orderbookL3 order-level orderbook snapshots with individual order IDs and sizesHistorical onlyPro+

Real-time subscriptions

Subscribe to live market data feeds when you need proxied venue updates with minimal latency.

JavaScript
// Subscribe to real-time order book updates
ws.send(JSON.stringify({
op: "subscribe",
channel: "orderbook",
symbol: "BTC"
}));
// Subscribe to real-time trades
ws.send(JSON.stringify({
op: "subscribe",
channel: "trades",
symbol: "ETH"
}));
// Subscribe to L4 orderbook diffs (Pro+, real-time only)
// Messages are batched by block and include user wallet addresses
ws.send(JSON.stringify({
op: "subscribe",
channel: "l4_diffs",
symbol: "BTC"
}));
// Subscribe to L4 order lifecycle events (Pro+, real-time only)
// Streams order state changes (new, partial fill, filled, cancelled)
ws.send(JSON.stringify({
op: "subscribe",
channel: "l4_orders",
symbol: "ETH"
}));
// Subscribe to HIP-3 L4 channels
ws.send(JSON.stringify({
op: "subscribe",
channel: "hip3_l4_diffs",
symbol: "km:US500"
}));
ws.send(JSON.stringify({
op: "subscribe",
channel: "hip3_l4_orders",
symbol: "km:US500"
}));
// Unsubscribe
ws.send(JSON.stringify({
op: "unsubscribe",
channel: "orderbook",
symbol: "BTC"
}));

L4 orderbook streaming

L4 channels deliver a full snapshot first, then continuous diff batches so you can reconstruct the live order-level book.

Python
import websockets, json, asyncio
async def stream_l4():
uri = "wss://api.0xarchive.io/ws?apiKey=YOUR_KEY"
async with websockets.connect(uri, max_size=20_000_000) as ws:
# Subscribe to L4 diffs (works for l4_diffs or hip3_l4_diffs)
await ws.send(json.dumps({
"op": "subscribe",
"channel": "l4_diffs",
"symbol": "BTC"
}))
book = {"bids": {}, "asks": {}}
snapshot_ts = None
async for msg in ws:
data = json.loads(msg)
if data["type"] == "l4_snapshot":
# Full book delivered first (every order including triggers)
snapshot_ts = data["timestamp"]
for order in data["data"]["bids"]:
book["bids"][order["oid"]] = order
for order in data["data"]["asks"]:
book["asks"][order["oid"]] = order
print(f"Snapshot: {len(book['bids'])} bids, {len(book['asks'])} asks")
elif data["type"] == "l4_batch" and snapshot_ts is not None:
# Apply diffs to maintain the book
for diff in data["data"]:
if diff["ts"] <= snapshot_ts:
continue
side = "bids" if diff["side"] == "B" else "asks"
oid = diff["oid"]
if diff["dt"] == "new":
book[side][oid] = {
"oid": oid, "side": diff["side"],
"price": diff["px"], "size": diff["sz"],
"user_address": diff["user"]
}
elif diff["dt"] == "update":
if oid in book[side]:
book[side][oid]["size"] = diff["sz"]
elif diff["dt"] == "remove":
book[side].pop(oid, None)
asyncio.run(stream_l4())

Keep exploring WebSocket