Skip to main content

starknet_subscribeNewHeads RPC Method

Creates a WebSocket stream which will fire events for new block headers.

Updated on
Jun 13, 2025

starknet_subscribeNewHeads RPC Method

To query a specific block, use a payload like {"block_id": 100000}. To query the latest block, use "params": ["latest"]

Parameters

SUBSCRIPTION_BLOCK_ID
string
The block number in integer, block hash in hexadecimal string, or tag ('latest'). Please note that `pending` tag is not supported

Returns

SUBSCRIPTION_ID
string
An identifier for this subscription stream used to associate events with this subscription
Request
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free