eth_subscribe RPC Method | Robinhood Docs

eth_subscribe RPC Method

Starts a subscription to a specific event. The API credit value for this method is 20.

Updated on

Mar 18, 2026

Parameters

Customize

subscription name

The type of event you want to subscribe to (i.e. newHeads, logs). This method supports the following subscription types:

data

The arguments such as an address, multiple addresses, and topics. Note, only logs that are created from these addresses or match the specified topics will return logs

Returns

result

The hex encoded subscription ID. This ID will be attached to all received events and can also be used to cancel the subscription using eth_unsubscribe

Request

WSCAT

wscat -c wss://docs-demo.robinhood-mainnet.quiknode.pro/ 
# wait for connection
{"id":1,"jsonrpc":"2.0","method":"eth_subscribe","params":["newHeads"]}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xcd0c3e8af590364c09d0fa6a1210faf5"
}