Skip to main content
Solami’s WebSocket endpoint lets you subscribe to real-time Solana updates using the standard Solana WebSocket API. Connect once and receive push notifications for account changes, program events, signature confirmations, and more. WebSocket is available on the Dev plan and above.

Endpoint

wss://rpc.solami.fast/ws/sol?api_key=YOUR_API_KEY

Connection limits

PlanConcurrent WebSocket connections
Free0
Dev2
Pro5
Ultra10
Shared Metal30

Subscription methods

All standard Solana WebSocket subscription methods are supported.
MethodWhat it does
accountSubscribeReceive updates when an account’s data changes
programSubscribeWatch all accounts owned by a program
signatureSubscribeGet notified when a transaction is confirmed
logsSubscribeStream transaction logs matching a filter
slotSubscribeReceive slot progression updates
rootSubscribeGet notified when a new root is set
Each subscribe method has a corresponding unsubscribe method (e.g., accountUnsubscribe).

Usage example

This example subscribes to account changes using the native WebSocket API:
const ws = new WebSocket(
  "wss://rpc.solami.fast/ws/sol?api_key=YOUR_API_KEY"
);

ws.onopen = () => {
  ws.send(
    JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "accountSubscribe",
      params: [
        "ACCOUNT_ADDRESS",
        { encoding: "jsonParsed", commitment: "confirmed" },
      ],
    })
  );
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  if (data.method === "accountNotification") {
    console.log("Account changed:", data.params.result);
  }
};
Replace ACCOUNT_ADDRESS with the base-58 public key of the account you want to watch.
WebSocket connections can drop during network events. In production, implement reconnection logic to avoid missing updates.

WebSocket vs gRPC

Both WebSocket and gRPC deliver real-time data, but they suit different use cases.
WebSocketgRPC
ProtocolStandard WebSocket (JSON)Yellowstone gRPC (Protobuf)
PlansDev and abovePro and above
Best forBrowser apps, simple integrationsHigh-throughput backends, MEV bots
FilteringBasic (by account or program)Advanced (by program, account, instruction)
ThroughputModerateVery high
Use WebSocket when you need browser support or a simple integration. Use gRPC when you need high throughput, advanced filtering, or minimal parsing overhead.

Next steps

Streaming data guide

Step-by-step guide for setting up WebSocket and gRPC subscriptions.

gRPC streams

Higher-throughput streaming for production backends.

Plans

See connection limits across all plans.