Skip to main content
The Live Data WebSocket API provides real-time streaming via GET /ws on wss://api.hypedexer.com. The sidebar documents all available subscriptions and their schemas.

Connection

Authenticate the handshake with X-API-Key: <key>, Authorization: Bearer <key> or ?api_key=<key>. The server answers {"type": "connected"} (except on a ?mode=mirror connection), then sends {"type": "ping", "ts": <ms>} every 60 seconds; reply {"method": "pong"} or the connection is closed after about 180 seconds with code 4000. Full details in the WebSocket overview.

What this section covers

The subscriptions below mirror Hyperliquid’s own feeds and share one envelope, {"channel": "<name>", "data": {...}}:
  • Market data: allMids, trades, candle, allCandles, bbo, l2Book, l4Book, l4BookUpdates
  • Asset context: activeAssetCtx, allActiveAssetCtx, fundingRates, setOracleUpdates
  • Fills and orders: userFills, allFills, orderUpdates (by user or by builder code), orderCompletions (orders that ended after being executed, all users), allTwapStatusUpdates
  • Accounts: allDexsClearinghouseState (account state of every user of a builder code, all dexes, one subscription)
  • Account and events: userEvents, userFundings, userNonFundingLedgerUpdates, allLedgerUpdates (ledger events of all users), webData2
Each subscription is acknowledged before its first data frame: l2Book, l4Book, l4BookUpdates and bbo with {"type":"subscriptionUpdate","subscription":{...},"active":true}, every other one with {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{...}}}. With ?mode=mirror, l2Book also answers subscriptionResponse.
?mode=mirror is optional and does not restrict a connection to these subscriptions: with or without it, the same socket also serves the indexed liquidations stream, whose frames use a different envelope ({"type":"liquidation","count":N,"data":[...]}). A mirror connection receives no {"type": "connected"} frame.

Protocol

All messages are JSON. The client sends subscribe, unsubscribe, and pong messages. The server sends acknowledgements, snapshots, and real-time updates.
A missing required parameter is answered with {"type": "error", "message": "..."}. Apart from orderCompletions and allLedgerUpdates, which refuse unknown parameters, channels accept and ignore parameters they do not support: a filter that a channel page does not list is not applied, and the subscription receives the unfiltered stream. There is no replay: after a reconnect, a stream resumes at the present moment. See Reconnecting for the REST catch-up options.