WebSocket Overview
Subscribe to real-time Solana blockchain events using the WebSocket RPC interface.
Endpoint
Frankfurt (default)
text
wss://ws.sol.flashland.devNew York
text
wss://ws.nyc.sol.flashland.devAuthenticate with the x-api-key header on connect.
Quick Connect
Frankfurt (default)
bash
wscat -c wss://ws.sol.flashland.dev -H "x-api-key: YOUR_API_KEY"New York
bash
wscat -c wss://ws.nyc.sol.flashland.dev -H "x-api-key: YOUR_API_KEY"Subscription Pattern
All WebSocket subscriptions follow a three-step lifecycle:
- Subscribe - Send a
*Subscriberequest to start receiving notifications. The response contains a subscription ID. - Receive - Notifications are pushed to your client as events occur on chain.
- Unsubscribe - Send a
*Unsubscriberequest with the subscription ID to stop receiving notifications.