Skip to content
All library documents

Hyperliquid WebSocket Streaming and Reconnection Handling

Article Hyperliquid docs

Summary

The document explains that Hyperliquid provides WebSocket connections for real-time exchange data and as an alternative to sending requests over HTTP. Clients connect to the endpoint for their chosen network, then send subscription messages to receive updates such as trades for a specified asset. The example demonstrates the basic subscription and acknowledgement flow, but does not describe message formats or trading logic in depth.

A key operational requirement is to handle server-initiated disconnects and reconnect gracefully, since connections may drop without notice. The document says missed data is included in a snapshot acknowledgement after reconnect; clients can also request missing information through the corresponding info endpoint. It does not specify reconnection timing, ordering guarantees, snapshot semantics, or how to reconcile streamed data with queried records. The guidance is therefore useful for designing a resilient market-data client, but must be supplemented with details about individual subscription channels and recovery behavior.

Key ideas

  • Hyperliquid WebSockets provide real-time exchange data and an alternative to HTTP requests.
  • Clients connect to the endpoint for the intended network before subscribing to a data channel.
  • A subscription receives a response acknowledging the requested stream.
  • Clients should expect server-side disconnects and implement reconnection handling.
  • After reconnecting, clients can use the snapshot acknowledgement or query information to recover missed data.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.