Skip to main content

WebSocket endpoint

Pass your API key as a query parameter. Keys are prefixed with pn_live_.

Networks

Latency

hypernode delivers committed transactions ~1 second before HyperLiquid’s own public API.

Keep-alive

The server sends WebSocket ping frames every 30 seconds. Your client must respond with pong within 90 seconds or the connection is closed. Most WebSocket libraries handle this automatically. You can also send application-level pings:
Response:

Reconnection

There is no event replay or gap-fill mechanism. If your connection drops, you may miss events during the disconnection window. Reconnect immediately with exponential backoff:
On successful reconnect, reset your delay and re-send all subscription messages.

Full Python example

A complete example that connects, authenticates, subscribes to fills, and processes events:
Install the websockets library with pip install websockets (not pip install websocket).

Subscription acknowledgement

After a successful subscribe, the server sends one acknowledgement message before any events:
Match on event.get("action") == "subscribed" and skip it, then process events by event["type"].