Subscribe to a continuous stream of L2 order book snapshots for any Hyperliquid perp or spot asset. The payload is wire-equal to the public HyperliquidDocumentation Index
Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
l2Book WebSocket subscription - same channel name, same levels shape, same aggregation parameters. Point your client at wss://hypercore.goldrushdata.com/ws?key=<GOLDRUSH_API_KEY> and the rest of your code stays the same.
Endpoint
Your GoldRush API key. Passed as a query parameter at connection time - no
Authorization header is used.Subscribe
Send this JSON message after the connection is established:Always
"subscribe".Example
Unsubscribe
Send the samesubscription body with method: "unsubscribe":
Streamed message
Each message haschannel: "l2Book" and a data payload with the current book snapshot for the subscribed coin.
Always
"l2Book".Notes
- Wire-compatible with
wss://api.hyperliquid.xyz/wsl2Booksubscriptions - same channel name, samelevelsshape. coinis optional on GoldRush. Omit it to stream the entire L2 order book across every asset on a single subscription. The public Hyperliquid API requirescoinand locks each subscription to one asset at a time.- No 1000-subscription-per-IP cap - multiplex hundreds of
l2Booksubscriptions on a single connection. - For OHLCV candles instead of raw book state, use the Streaming API OHLCV streams.