Heartbeats & Post RPC
Keep connections alive with ping/pong, handle lag notifications, and submit info or exchange requests over WebSocket.
WS
/wsPing/Pong · Post RPC
Heartbeats (ping / pong)
Send periodic ping messages to keep idle WebSocket connections alive:
{ "method": "ping" }Lag & Reconnection
If a client falls more than 4,096 blocks behind the stream, the server sends:
{ "channel": "lagged" }The stream then resumes from the latest committed block. When you receive lagged (or after any disconnect), re-fetch snapshots via POST /info or re-subscribe to rebuild local state cleanly.
WebSocket post RPC
You can execute any POST /info query or signed POST /exchange action over an open WebSocket connection to avoid HTTP round-trip overhead. Responses are matched by your client-supplied numeric id (up to 100 concurrent in-flight post requests per IP).
{
"method": "post",
"id": 1,
"request": {
"type": "info",
"payload": { "type": "allMids" }
}
}