What are gRPC streams?
Geyser or gRPC streams provide the fastest and most efficient way to stream Solana data directly to your backend. With gRPC, you can subscribe to blocks, slots, transactions, and account updates. It is highly configurable. You can filter or limit each subscription. It allows the client-server to create new subscriptions or cancel existing ones immediately. gRPC is available through OrbitFlare Pass, gRPC Subscription, or Dedicated gRPC Nodes. Please check our Products page for more details on each option.Subscribe Request
In the subscribe request, you need to include the following:commitment
: Specifies the commitment level, which can be processed, confirmed, or finalized.accountsDataSlice
: An array of objects{ offset: uint64, length: uint64 }
that allows you to receive only the required data slices from accounts.ping
: An optional boolean. Some cloud providers (e.g., Cloudflare) close idle streams. To keep the connection alive, set this to true. The server will respond with a Pong message every 15 seconds, avoiding the need to resend filters.
Slots
filterByCommitment
: By default, slots are sent for all commitment levels. With this filter, you can choose to receive only the selected commitment level.interslotUpdates
: Enables the subscription to receive updates for changes within a slot, not just at the beginning of new slots. This is useful for more granular, real-time slot data.
Examples
TypeScript Slot Subscription Example
TypeScript Transaction Subscription with Parsed Data
Filter Configuration
It’s possible to add limits for filters in the config. If thefilters
field is omitted, then filters don’t have any limits.