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.
Block and transaction-status subscriptions are not available. Use
transactions together with blocks_meta instead.
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.
- 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.