Yellowstone gRPC (Geyser)
Highly configurable real-time data streams.
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.
To learn more, please read the examples provided in the source repo.
gRPC is only available for dedicated nodes. You can provision a dedicated node directly from the Dashboard. To learn more, please visit Dedicated Nodes.
Subscribe Request
In the subscribe request, you need to include the following:
commitment
: Specifies the commitment level, which can be processed, confirmed, or finalized.
accounts_data_slice
: 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.
Next, youโll need to specify the filters for the data you want to subscribe to, such as accounts, blocks, slots, or transactions.
Examples
You can also refer to the examples in Rust and Go.
gRPC is typically accessed behind a load-balancer or proxy, terminating an inactive connection after 10 minutes. The best solution is to ping the gRPC every N seconds or minutes.
Last updated
Was this helpful?