Skip to main content
The server closes idle connections after 60 seconds of inactivity. This page explains how heartbeats work and how to handle disconnections.

Heartbeat

The server sends a WebSocket Ping frame every 30 seconds. Clients must respond with a Pong within 60 seconds or the connection is terminated.
Most WebSocket libraries respond to Pings automatically (gorilla/websocket, ws, websocket-client, etc.). No manual implementation required.

Application-Level Ping

Send a JSON-RPC ping to verify connectivity and retrieve server time. Useful for latency checks or confirming the connection is healthy.
This does not reset the 60-second timeout. Only the protocol-level Pong does that.

Reconnection

The server does not persist session state. When a connection drops, all subscriptions are cleared. Clients must reconnect and resubscribe.
Recommended strategy: Use exponential backoff (1s → 2s → 4s → 8s, max 30s), then resubscribe to all channels.