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 a region endpoint (Frankfurt shown):
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

Idle connections are eventually dropped without a close frame, so your client sees close code 1006. Send a WebSocket ping frame every 20 to 30 seconds to keep a connection open.

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.

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.

Keepalive

Idle connections are eventually dropped without a close frame. Send a WebSocket protocol ping frame every 20 to 30 seconds. A JSON-RPC message such as {"method": "ping"} does not work: Solana has no ping method, so the server replies with -32601 Method not found.
The OrbitFlare SDKs send ping frames and reconnect automatically.

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.