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 Start

Ready 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, or finalized data 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

MethodDescriptionUse Case
accountSubscribeAccount data changesWallet balance updates, token account monitoring
programSubscribeProgram-owned accountsDEX pools, NFT collections, game state
logsSubscribeTransaction log outputReal-time transaction feeds, event parsing
signatureSubscribeSignature confirmationTransaction status polling, user confirmations
slotSubscribeSlot progressionNetwork heartbeat, clock synchronization
rootSubscribeRoot slot changesFinality tracking
slotsUpdatesSubscribeSlot lifecycle eventsValidator 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:

CommitmentLatencyCertaintyUse Case
processed~400msLowestHigh-frequency trading, UI responsiveness
confirmed~1sMediumMost applications, balanced approach
finalized~15sHighestFinancial 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:

FeatureWebSocketgRPC (Yellowstone)
ProtocolJSON-RPC 2.0 over WSProtocol Buffers over gRPC
Data formatJSON (human-readable)Binary (compact)
ThroughputModerate (~100-500 msgs/sec)High (1000+ msgs/sec)
FilteringMethod-specific filtersAdvanced server-side filtering
Best forWallet UIs, signature tracking, low-volume monitoringIndexers, high-frequency trading, analytics pipelines
ComplexitySimple (native browser support)Moderate (requires gRPC libraries)
BandwidthHigher (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


Did this page help you?