Skip to content

Hyperliquid Orderbook streaming

Live market data for your backend.

BTC orderbookSample data
Price / USDSize / BTCOrders
75,904.001.120008
75,903.002.8700019
75,902.000.950006
75,901.005.1000035
Spread 1.00 USD BTC / USD
75,900.002.100008
75,899.003.4500019
75,898.001.820006
75,897.004.7800035
Sample data: a shortened view of aggregated price levels.

A deeper view of the market.

Stream price levels, trades and order events directly from Supanode’s Hyperliquid node over WebSocket. Use full snapshots or incremental book changes in your backend.

A local book you can
keep in sync.

Use l2Diff to maintain a deep local book from a snapshot and incremental updates. Your backend applies each change to its stored state.

Hyperliquid nodeSupanode · Tokyo
Your backendWSS + x-token
Your applicationLocal orderbook
1

Start with Snapshot

Subscribe to l2Diff. Replace all local state with the received Snapshot. levels[0] contains bids; levels[1] contains asks.

2

Apply matching Updates

Check prevHeight equals the last height you applied. Insert or overwrite each upd [px, sz, n] triple and remove each price in del. Store the new height.

3

Reset after a gap

A prevHeight mismatch means stale state. Unsubscribe and subscribe again for a fresh Snapshot. After disconnecting, discard your book, reconnect with authentication and resend subscriptions.

l2Diff continuity.
A market may not change on every block. Check prevHeight, not height - 1 or time. Any new Snapshot replaces the entire book for that subscription.

A del price can have moved beyond your chosen depth. It does not necessarily mean the order was cancelled or filled. On a quiet market, no book frames can be normal; use ping/pong to check connection liveness.

Read the l2Diff continuity rules

Streams and product limits.

1,000 levels / sideWSS transportTokyo nodex-token authentication

Choose the view
your application needs.

One authenticated connection can carry several subscriptions. Select a market and the information your backend needs to maintain.

StreamWhat you receiveUse it for
l2BookThe full aggregated book in each frame. Up to 1,000 levels per side.Replacing a local price-level book
l2DiffA full Snapshot, then Updates containing changed and removed levels.Maintaining deep books with less repeated data
bboBest bid and best offer. Separate bid and ask fields.Top-of-book pricing
tradesExecuted trades with price, size and trade ID.Trade tapes and market activity
l4BookIndividual resting orders with owner addresses.Order-level analysis
bookDiffsRaw book changes from the node.Custom book processing
orderUpdatesOrder status changes for a subscribed address.Following an address
allMidsMid prices across markets, without a coin parameter.A broad market view

Perpetuals use symbols such as BTC. Spot pairs use @<index> from spotMeta. l4Book is order-level data; the L2 depth parameter does not apply.

Inspect every stream and frame format

Current service policy sets no caps on connections, subscriptions, markets or message rate. Test capacity and update delivery with your own workload.

Read current limits · Billing details

Price & access.

Hyperliquid

Orderbook streaming

Separate subscription

Native WebSocket feed for price levels, trades and order events.

  • Up to 1,000 L2 levels per side
  • No per-message fee; product limits apply
  • Monthly, prepaid · USDC / SOL / ETH / USDT
  • Direct Telegram support
$289
/ month

Free trial up to 24h on request, no card; our team confirms availability, endpoint and key setup.

Connect from your backend.

Use a WebSocket client that can send HTTP headers. Add x-token to the handshake, then send a subscription message after connecting.

  1. Start in the portalRequest Orderbook streaming or a trial.
  2. Get your connection detailsThe team sets up your endpoint and key.
  3. Connect and test your workloadAuthenticate from your backend and subscribe.
Connection settings
Endpoint: wss://toy.hl.supanode.xyz:48080/ws
Header:   x-token: YOUR_KEY
Illustrative subscription · BTC / l2Diff
{
  "method": "subscribe",
  "subscription": {
    "type": "l2Diff",
    "coin": "BTC",
    "nLevels": 1000
  }
}

Depth is explicit

Omit nLevels for the default 20. Do not pass nLevels: 20 explicitly; the current validator rejects it. Values above 1,000 return no data.

Unsubscribe precisely

Repeat the entire subscription object, including nLevels, with method: unsubscribe. Check acknowledgements on coin and type.

Browser integration needs a backend.
The browser WebSocket API cannot set x-token. Query-string keys and Authorization: Bearer are not accepted. Keep your key on the server and forward the data your UI needs.
How does this differ from the public API?
Review these differences before reusing a native client.
L2 depthThe public Hyperliquid API exposes up to 20 L2 levels. Supanode extends nLevels to 1,000.
Book updatesSupanode adds l2Diff.
Auth headerSupanode requires an x-token header.
Message shapebbo uses separate bid and ask fields; l2Book includes nLevels.

Protocol differences in Docs

Open working backend examples

Before you subscribe.

Does this include historical market data?

The WebSocket feed delivers current events from subscription time. For historical fills and SQL analysis, use the separate Hyperliquid Historical Indexer.

Is this an exchange or trading API?

Use this product for market and order data. Your application handles order submission and strategy execution.

How do I restore the book after a disconnect?

After a disconnect, authenticate again and resend subscriptions. Replace your l2Diff state with the new Snapshot before applying Updates.

Is this a fixed latency service?

Update delivery depends on book changes, your connection and client processing. Test your own market, region and workload during the trial.

How do I keep the connection alive?

Send standard WebSocket ping frames, or the application message {"method":"ping"}; the server returns {"channel":"pong"}. The server does not initiate pings. Quiet book streams can be normal.