Endpoints
Enhanced WebSockets are available on mainnet and devnet:- Mainnet
wss://mainnet.helius-rpc.com/?api-key=<api-key> - Devnet
wss://devnet.helius-rpc.com/?api-key=<api-key>
WebSockets have a 10-minute inactivity timer; implementing health checks and sending pings every minute is heavily recommended to keep the WebSocket connection alive.
Authorizations
Body
Response
Subscription id (needed to unsubscribe)
Managing Subscriptions
Subscription IDs
WhentransactionSubscribe succeeds, the server returns a subscription ID in the result field. This is the same number that appears in params.subscription on every notification from that subscription:
Unsubscribing
To stop receiving notifications, calltransactionUnsubscribe with the subscription ID. Each transactionSubscribe call on the same connection creates a separate subscription with its own ID, so make sure to unsubscribe before resubscribing to avoid receiving duplicate notifications.
transactionUnsubscribe. This is expected behavior.