
x-token.
Clients
Subscribe
Subscribe is a bidirectional stream. Send a SubscribeRequest with one or more named filters; each update names the filters it matched in filters.
Blocks
Ablocks filter delivers one SubscribeUpdateBlock per slot at the commitment you asked for. include_transactions defaults to true; include_accounts and include_entries default to false. account_include keeps only the transactions and account writes that touch the listed addresses, while executed_transaction_count and entries_count always describe the whole block.
Without include_accounts the block arrives the moment its transactions and entries are complete, and updated_account_count is 0. With include_accounts it arrives once the block’s account writes are complete as well, which is usually tens of milliseconds later.
Commitment
Setcommitment to PROCESSED, CONFIRMED or FINALIZED. PROCESSED gives the earliest updates; a processed update can still belong to a slot that is later skipped.
Example request
Keepalive
The server sends aping update about every 15 seconds. Reply on the same stream with a request that carries only ping:
pong update. A ping-only request leaves your filters unchanged.
Unary calls
The same service answersGetSlot, GetBlockHeight, GetLatestBlockhash and Ping, each with an optional commitment.
Staying connected
- Set the client’s maximum decoded message size to at least 64 MB. Large account and transaction updates exceed default limits.
- For
blocks, raise the client’s HTTP/2 stream and connection windows to at least 16 MB (initial_stream_window_sizeandinitial_connection_window_sizeinyellowstone-grpc-clientand tonic). With the default 64 KB window a 3 MB block takes several milliseconds longer to arrive. - Streams can end during maintenance. Reconnect with exponential backoff and resubscribe; the examples do this.
- Do not retry on
UNAUTHENTICATED,NOT_ENTITLED,IP_NOT_ALLOWEDorQUOTA_EXCEEDED. These need a change on your side. See Errors.
Metering
Per-GB plans and trials count the bytes streamed to you. Narrow filters use less data: preferaccount_include or owner over broad subscriptions, and skip vote transactions unless you need them. A blocks filter with include_transactions carries every transaction of every block, about as much data as an unfiltered transactions stream.