WebSocket

WebSocket Overview

Endpoint configuration and subscription patterns for real-time Solana WebSocket subscriptions.

Subscribe to real-time Solana blockchain events using the WebSocket RPC interface.

Endpoint

wss://ws.nln.clr3.org

Authenticate with the x-api-key header on connect.

Quick Connect

wscat -c wss://ws.nln.clr3.org -H "x-api-key: YOUR_API_KEY"

Subscription Pattern

All WebSocket subscriptions follow a three-step lifecycle:

  1. Subscribe - Send a *Subscribe request to start receiving notifications. The response contains a subscription ID.
  2. Receive - Notifications are pushed to your client as events occur on chain.
  3. Unsubscribe - Send a *Unsubscribe request with the subscription ID to stop receiving notifications.