/ DEVELOPERS / API / ETH_SUBSCRIBE:NEWHEADS

eth_subscribe:newHeads

WS-only. Streams a new event every time a block is sealed (head update). Requires connecting to /ws — over HTTP this is rejected.

eth_subscribe:newHeads

WS-only. Streams a new event every time a block is sealed (head update). Requires connecting to /ws — over HTTP this is rejected.

eth_*category: subscriptionreturns: subscription
Share link

Parameters

Always 'newHeads'

This is a WebSocket-only subscription topic. Sending over HTTP will return an error — connect to /ws for streaming events.

Response

Press Send Request to see a response.

Copy as

curl -X POST '/rpc' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_subscribe","params":["newHeads"],"id":1}'