Overview
OrbitFlare supports persistent WebSocket connections for real-time Solana data. WebSocket subscriptions push updates to your client as they occur on-chain — no polling required. WebSocket endpoints use thewss:// scheme with the same region codes as the HTTP API:
Connecting
WebSocket connections idle for more than 60 seconds without any message exchange are closed by the server. Send a ping or keep your subscriptions active to maintain the connection.
Subscription Methods
accountSubscribe
Receive updates whenever a specific account’s lamport balance or data changes.logsSubscribe
Receive transaction log messages in real time. Optionally filter to a specific program.slotSubscribe
Receive a notification each time a slot is processed.signatureSubscribe
Receive a one-time notification when a specific transaction signature reaches a given commitment level.programSubscribe
Receive updates for all accounts owned by a specific program.blockSubscribe
Receive full block data as each block is confirmed. Requires an add-on — contact support to enable.rootSubscribe
Receive the highest confirmed root slot each time it advances.voteSubscribe
Receive raw vote transactions as they are observed in the gossip network. High volume — filter carefully.Unsubscribing
Each subscription method has a correspondingUnsubscribe method. Pass the subscription ID returned in the initial subscription response.
accountUnsubscribe, logsUnsubscribe, slotUnsubscribe, signatureUnsubscribe, programUnsubscribe, blockUnsubscribe, rootUnsubscribe, voteUnsubscribe.
Keepalive
WebSocket connections are closed after 60 seconds of inactivity. Send a JSON-RPC ping periodically to keep the connection alive:Reconnection
Implement automatic reconnection with exponential backoff for production applications:Connection Limits
WebSocket connections share the same per-IP limit as gRPC connections. See Authentication & Limits for details.See Also
HTTP RPC API
JSON-RPC 2.0 request format, batch requests, and all available methods.
Error Codes
HTTP status codes, JSON-RPC errors, and how to handle them.