blockSubscribe
Not available on SVS nodes. This method is considered unstable in Agave/Solana and is therefore not enabled on our RPC infrastructure. Calls will be rejected. Use an alternative subscription method or polling-based pattern for this use case. Subscribe to receive notification anytime a new block is confirmed or finalized. Parameters
filter(required) — Filter for block subscription (all, or {mentionsAccountOrProgram: }).config(optional) — Optional configuration object. Every field is optional; omit the entire object to use defaults.
Pass Authorization: <api-key> on each request.
JSON-RPC protocol version.
2.0Possible values: Request identifier echoed back in the response.
1Must be blockSubscribe.
blockSubscribePossible values: Successful blockSubscribe response.
Base envelope of every JSON-RPC 2.0 response.
2.0Possible values: Echoed request id.
1Subscription id. Save this value to call the matching unsubscribe method later.
24040Authentication required or invalid.
Insufficient permissions for the request.
Rate limit exceeded for this tier.
Unexpected server error.
# cURL doesn't speak WebSocket — use `websocat` (or `wscat -c`).
# Install: cargo install websocat # or npm install -g wscat
echo '{
"jsonrpc": "2.0",
"id": 1,
"method": "blockSubscribe",
"params": [
"all",
{
"encoding": "json",
"showRewards": false,
"transactionDetails": "full",
"maxSupportedTransactionVersion": 0
}
]
}' | websocat wss://public.rpc.solanavibestation.com{
"jsonrpc": "2.0",
"id": 1,
"result": 24040
}Last updated