Compare protocols
| Feature | gRPC | WebSocket |
|---|---|---|
| Protocol | Yellowstone gRPC | JSON-RPC over WebSocket |
| Min plan | Pro ($99/mo) | Dev ($49/mo) |
| Throughput | High | Moderate |
| Filtering | Advanced (account, program, tx type) | Basic |
| Best for | Production streaming, HFT, block processing | Simple subscriptions, balance monitoring |
gRPC
gRPC streams are built on the Yellowstone protocol and give you fine-grained, low-latency access to transactions, accounts, and blocks. Use gRPC when you need high volume or need to filter across multiple accounts and programs simultaneously. Endpoint:https://grpc.solami.fast?api_key=YOUR_API_KEY
Minimum plan: Pro ($99/mo) — see pricing
When to use gRPC
- Streaming all transactions for a specific program
- Monitoring multiple accounts simultaneously
- High-frequency trading data pipelines
- Block-level data processing
Example: subscribe to transactions
This example uses the Solami Rust SDK to subscribe to confirmed transactions for a given account:Set
SOLAMI_API_KEY in your environment before running. solami::from_env() reads it automatically.WebSocket
WebSocket uses the standard Solana JSON-RPC subscription interface, making it a drop-in for any tooling that already speaks it. Use WebSocket when you have a small number of subscriptions and don’t need advanced filtering. Endpoint:wss://rpc.solami.fast/ws/sol?api_key=YOUR_API_KEY
Minimum plan: Dev ($49/mo) — see pricing
When to use WebSocket
- Monitoring a single account balance
- Watching for transaction confirmations
- Receiving slot or root notifications
- Lighter workloads with fewer than a handful of subscriptions
Example: subscribe to account changes
ACCOUNT_ADDRESS with the base-58 public key of the account you want to watch.
For full details on available subscription methods, see the WebSocket infrastructure page.
Related
- gRPC infrastructure — protocol details, filtering options, and connection setup
- WebSocket infrastructure — subscription methods and limits
- API Keys — creating a gRPC or RPC key
- Pricing plans — plan requirements for each protocol