Parameters
- subscription typestringREQUIRED
The event stream to subscribe to. The newHeads type sends a notification when a new block header is added.
- newHeads
New block headers
Returns
- resultstring
A hexadecimal subscription ID. Use it to cancel the subscription with eth_unsubscribe on the same WebSocket connection.
Request
Response
1{2"jsonrpc": "2.0",3"id": 1,4"result": "0x9cef478923ff08bf67fde6c64013158d"5}
1{2"jsonrpc": "2.0",3"id": 1,4"result": "0x9cef478923ff08bf67fde6c64013158d"5}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free