Hyperliquid Data Feeds: Every Real-Time Stream Explained

Hyperliquid presents multiple different ways of getting data feeds. We explain how to do it and where Hydromancer can help.

HydromancerTeam
Hyperliquid Data Feeds: Every Real-Time Stream Explained

Hyperliquid produces a block roughly every 70ms, and everything on the exchange — every trade, book update, stop-loss, TWAP, deposit — can be consumed as a stream. There are two ways to do it: the official Hyperliquid websocket (free, single-coin subscriptions) and Hydromancer's feeds (wire-compatible with the official API, plus multi-coin subscriptions, all-market firehoses, four ways to stream the orderbook, and channels that don't exist anywhere else). This guide maps all of it, with runnable code.

Map of Hyperliquid real-time data streams: trades; order book streams l4BookUpdates, l2BookDiff, l2Book and bbo; and tpslUpdates, allTwapStatusUpdates and allUserNonFundingLedgerEvents, which are not on the official Hyperliquid websocket. The feeds support multi-coin subscriptions and per-subscription sequence numbers, and event streams support cursor replay

Two ways to stream Hyperliquid

One honest caveat: the official websocket at api.hyperliquid.xyz is free and fine for a lot of jobs. One bot, one coin, a book and a trade stream — use it, skip the rest of this page. Read the official Hyperliquid docs to get started.

Our feeds exist for everything past that point. They're wire-compatible — an HL client sending the native coin: "BTC" shape works as-is — and they add what builders kept asking us for:

  • Multi-coin subscriptions — coins: ["BTC", "ETH", "xyz:SP500"] in one subscription instead of one socket dance per market.
  • All-market firehoses — every coin on the exchange, one subscription.
  • Four different ways to stream orderbook — from L4 with user addresses down to aggregated display books.
  • Lower latency than the official stream — for users who demand the lowest ms from block time to message time.
  • Streams the official API doesn't have — every TP/SL order, every TWAP, every ledger event on the exchange.
  • Reconnection that doesn't lose data — gap-free sequence numbers and cursor-based replay.

Quick start: live trades in twenty lines

Wait for connected, subscribe, answer pings. That's the whole protocol.

The trade feed

Each message is a batch of WsTrade objects — one per matched (buyer, seller) pair, batched per block. The shape matches Hyperliquid exactly, which means it also inherits HL's one genuinely confusing field, so let's spell it out:

  • side is the taker's side. "B" means the taker bought; "A" means the taker sold.
  • users is always [buyer, seller]. The taker is users[0] when side="B" and users[1] when side="A".
  • tid is unique within (coin, time) — for a globally unique trade id, key on (block_time, coin, tid).

One gotcha worth knowing before you hit it: all trades messages share a single channel, so a connection holds one trades subscription. Watching several coins means one subscription with a coins array — not several subscriptions. Omit the filter entirely and you get the all-coins firehose (ws:allTrades add-on).

The orderbook feeds: four ways to stream the book

“Stream the Hyperliquid orderbook” means four different things depending on what you're building. We publish the tradeoffs:

StreamLatencyBuilt forl4BookUpdatesFastestHFT and market making — user address on every levell2BookDiff~2ms after L4Maintaining local books — per-level diffs, lowest bandwidthl2Book (raw)~5ms after L4Stateless consumers — every message is a complete snapshotl2Book (aggregated)~15ms after L4Charting and displaybboSame as l2BookPrice tracking — minimal bandwidth

For an in-depth explanation of the difference between the orderbook streaming types, read our guide: BBO vs L2Book vs L4Book: types of orderbook streaming on Hyperliquid.

l2Book ships every block (~70ms) at 1, 10, 20, or 50 levels per side, with optional price aggregation — nSigFigs 2–5, plus a mantissa snap. With nSigFigs: 5, mantissa: 2, a bid at 70325 becomes 70324 and an ask at 70325 becomes 70326: bids round down, asks round up, always against you, never flattering the spread.

The all-markets firehose deserves its own paragraph, because it's where bandwidth goes to die if you do it wrong. Omit coins and you get every market — filtered by marketTypes ("perp", "spot", "outcome", or "*" to auto-opt-in to whatever ships next; the default is perps only and never silently grows). Then set pushMode: "delta": a full snapshot of every coin once on subscribe, then only the coins that changed each block. Same data as "full" mode for ~80% less bandwidth. Each delta message is still a complete snapshot for the coins it contains — overwrite your local book per coin, no diff-merging logic needed.

Streams that don't exist anywhere else

Three channels marked 💧 in our docs — not part of the original Hyperliquid API, added because builders needed them:

  • tpslUpdates — every TP/SL trigger order on the exchange, streamed as add / remove diffs per block. Trigger orders are immutable, so the state machine is trivial: an order appears, then it terminates (triggered, canceled, siblingFilledCanceled, liquidatedCanceled…). This is how you watch stop-loss walls form in real time.
  • allTwapStatusUpdates — every TWAP on the exchange through its lifecycle: activated, finished, terminated, error, with executed size and notional as it fills. Large algorithmic flow, visible while it's happening instead of after.
  • allUserNonFundingLedgerEvents — exchange-wide ledger stream: deposits, withdrawals, transfers, vault flows, liquidation events, borrow/lend, and (opt-in) staking. Twenty-plus delta types. One subscription replaces the polling loop behind most flow dashboards.

If it's happening on Hyperliquid right now, there's a channel for it.

Built for reconnects

Feeds are only as good as their failure behavior, so the semantics are explicit:

  • Every message carries a per-subscription seq, and it's gap-free. A jump in seq means you lost a message — no guessing.
  • Sessions replay from a cursor on reconnect. Replay and live can overlap by design; each stream documents its dedup key — (time, txIndex, role) for ledger events, (time, txIndex) for TWAPs — so exactly-once processing is a three-line check, not a research project.
  • The server never starts a delta book stream without first delivering the full snapshot. If it can't, the subscribe is rejected with a retryable error instead of leaving you with a silently incomplete book.

Official websocket vs Hydromancer feeds

CapabilityOfficial Hyperliquid WSHydromancerCoins per subscriptionOneMulti-coin arrays, or all-market firehoseOrderbook optionsL2 snapshotsL4 with addresses, L2 diffs, raw, aggregated, BBOBook depthStandard levels1 / 10 / 20 / 50 per sideTP/SL, TWAP, ledger streamsNot availabletpslUpdates, allTwapStatusUpdates, allUserNonFundingLedgerEventsReconnect semanticsResubscribe, gap unknownGap-free seq, cursor replay, documented dedupWire compatibility—HL-native shapes accepted as-isPriceFreeTiered by coin count; firehoses are add-ons

The latency figures above are our published numbers, and the wire compatibility is checkable in an afternoon: point your existing HL client at our endpoint and diff the streams.

What about historical data?

Feeds are for now. Everything before now — every fill, 1-second candle, position snapshot — lives in Reservoir, our free S3 archive. Full walkthrough: How to get Hyperliquid historical data — for free. The common pattern is both: backfill from the archive, then subscribe and dedupe at the seam.

FAQ

Does Hyperliquid have a real-time data feed?

Yes — an official websocket, plus Hydromancer's feeds on top. Some streams, like trades, accept the official subscription messages as-is, but connecting needs an API key and sessions work differently, so see connecting and reconnecting and each stream's page before switching.

What's the lowest-latency Hyperliquid data feed?

l4BookUpdates, which includes the user address on every level. l2BookDiff lands ~2ms behind it, raw l2Book snapshots ~5ms.

Can I stream every Hyperliquid market on one connection?

Yes. Omit the coin filter for the firehose (add-on permission), set marketTypes for the venues you want, and use pushMode: "delta" — full snapshot once, then only what changed.

Do the feeds cover HIP-3 venues and spot?

Yes. Coin strings carry the venue prefix ("xyz:SP500"), and book firehoses filter by market type: perp, spot, outcome.

What happens when my connection drops?

Reconnect with your session and replay resumes from your cursor. Overlapping events dedupe on a documented key per stream. seq restarts on every connection, so it catches gaps within a connection; after a reconnect, the replay sets hasGap if anything you missed couldn't be replayed.

How is it priced?

Tiers cap how many coins you can stream per feed; all-market firehoses are add-on permissions. Current limits are in the docs. Early-stage team? You may be eligible for the early-stage program 🌱

Grab a key, open a socket:

Subscribe to trades on one coin and you'll have live prints before your coffee cools. The full channel reference is in the docs — and if you build something on the feeds, show us in Discord.