Solana Websocket
Stream real-time Solana blockchain data using WebSocket subscriptions. Get instant notifications for account updates, transaction logs, signature confirmations, and block events without polling.
Quick StartReady to start streaming Solana data? Our WebSocket endpoint provides real-time access to on-chain events with minimal setup.
👉 Check Solana WebSocket Reference
What is Solana WebSocket?
Solana's WebSocket PubSub interface enables your application to receive real-time notifications over a persistent bidirectional connection. Instead of repeatedly polling RPC endpoints for updates, the server pushes events to your client as they occur on-chain.
Key features:
- Low latency: Notifications arrive within ~400ms of on-chain confirmation
- Server-side filtering: Subscribe to specific accounts, programs, or transaction types
- Commitment-aware: Choose between
processed,confirmed, orfinalizeddata freshness - Auto-cleanup: Subscriptions close automatically when no longer needed
- Standard compliance: Full support for Solana's JSON-RPC 2.0 WebSocket API
Best for:
- Wallet balance updates and transaction confirmations
- DEX price feed monitoring and order book updates
- NFT marketplace activity tracking
- Program account state changes
- Network liveness monitoring and slot progression
Supported Subscription Methods
Tatum's Solana WebSocket endpoint supports 7 of 9 standard subscription methods:
Supported methods
| Method | Description | Use Case |
|---|---|---|
accountSubscribe | Account data changes | Wallet balance updates, token account monitoring |
programSubscribe | Program-owned accounts | DEX pools, NFT collections, game state |
logsSubscribe | Transaction log output | Real-time transaction feeds, event parsing |
signatureSubscribe | Signature confirmation | Transaction status polling, user confirmations |
slotSubscribe | Slot progression | Network heartbeat, clock synchronization |
rootSubscribe | Root slot changes | Finality tracking |
slotsUpdatesSubscribe | Slot lifecycle events | Validator monitoring, network diagnostic |
Connection
Connect to the Solana WebSocket endpoint with your API key:
Supported networks:
- Mainnet:
wss://solana-mainnet.gateway.tatum.io/{API_KEY} - Devnet:
wss://solana-devnet.gateway.tatum.io/{API_KEY} - Testnet:
wss://solana-testnet.gateway.tatum.io/{API_KEY}
Commitment Levels
All subscription methods accept an optional commitment parameter that controls data freshness vs. certainty:
| Commitment | Latency | Certainty | Use Case |
|---|---|---|---|
processed | ~400ms | Lowest | High-frequency trading, UI responsiveness |
confirmed | ~1s | Medium | Most applications, balanced approach |
finalized | ~15s | Highest | Financial settlement, irreversible state |
Default: finalized (if not specified)
Recommendation: Use confirmed for most applications. It provides sufficient certainty while maintaining low latency.
WebSocket vs gRPC
Both WebSocket and gRPC provide real-time Solana data. Here's how to choose:
| Feature | WebSocket | gRPC (Yellowstone) |
|---|---|---|
| Protocol | JSON-RPC 2.0 over WS | Protocol Buffers over gRPC |
| Data format | JSON (human-readable) | Binary (compact) |
| Throughput | Moderate (~100-500 msgs/sec) | High (1000+ msgs/sec) |
| Filtering | Method-specific filters | Advanced server-side filtering |
| Best for | Wallet UIs, signature tracking, low-volume monitoring | Indexers, high-frequency trading, analytics pipelines |
| Complexity | Simple (native browser support) | Moderate (requires gRPC libraries) |
| Bandwidth | Higher (JSON overhead) | Lower (binary encoding) |
Recommendation:
- Use WebSocket for: wallet apps, transaction confirmations, UI updates, prototyping
- Use gRPC for: indexers, trading infrastructure, analytics, high-volume monitoring
Updated 31 minutes ago