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"}, 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, allTwapStatusUpdates
  • Account and events: userEvents, userFundings, userNonFundingLedgerUpdates, 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 restricts a connection to these subscriptions. It is optional: without it, the same socket also serves the indexed liquidations stream, whose frames use a different envelope ({"type":"liquidation","count":N,"data":[...]}).

Protocol

All messages are JSON. The client sends subscribe, unsubscribe, and pong messages. The server sends acknowledgements, snapshots, and real-time updates.