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.
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 depth
The public Hyperliquid API exposes up to 20 L2 levels. Supanode extends nLevels to 1,000.
Book updates
Supanode adds l2Diff.
Auth header
Supanode requires an x-token header.
Message shape
bbo uses separate bid and ask fields; l2Book includes nLevels.
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.