Skip to main content
Published May 11, 2026 Build with the Hyperliquid L2 Order Book The Hyperliquid WebSocket API exposes Hyperliquid’s l2Book channel at wss://hypercore.goldrushdata.com/ws, wire-equal to the public feed but with coin made optional and the per-IP subscription cap removed. A new recipe page shows how to turn that stream into the trading and analytics primitives most builders need.

Why it’s nice to work with

  • Complete snapshots, not diffs - every message contains a full [bids, asks] tuple in best-first order with px / sz / n per level. No sequence numbers to track, no diff replay buffer, no REST snapshot to bootstrap.
  • Self-healing on packet loss - drop a message or restart your process and the next tick arrives with the full book state, so your in-memory view is correct without reconciliation logic.
  • Wildcard coverage - omit coin to stream every asset’s book over a single subscription instead of fanning out one subscription per asset.

What you can build

The recipe walks through four patterns end-to-end with TypeScript and Python code:
  • Top-of-book tracker - read bids[0] and asks[0] from each message for a live ticker and spread.
  • Depth-weighted mid quote - size-weight the first K levels per side for a fair-value mid that’s robust to thin top-of-book liquidity.
  • Slippage estimator - walk levels until cumulative sz covers the requested notional and return the size-weighted fill price.
  • Liquidity heatmap - append each snapshot to a time-series store; because messages are complete, the heatmap rebuilds correctly from any contiguous slice of history.
Learn more