Skip to main content

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 the wss:// scheme with the same region codes as the HTTP API:
For the auto-routed mainnet endpoint:
Your license key is found in the Licenses section of your OrbitFlare Dashboard. Pass it as the api_key query parameter — the same key used for HTTP RPC.

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.
Update fields:

logsSubscribe

Receive transaction log messages in real time. Optionally filter to a specific program.
Update fields:

slotSubscribe

Receive a notification each time a slot is processed.
Update fields:

signatureSubscribe

Receive a one-time notification when a specific transaction signature reaches a given commitment level.
The subscription automatically closes after the first notification is sent.

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 corresponding Unsubscribe method. Pass the subscription ID returned in the initial subscription response.
Available unsubscribe methods: 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.