Skip to main content

eth_subscribe RPC Method

Starts a subscription to a specific event.

Updated on
May 21, 2026

Parameters

subscription_name
string
REQUIRED

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

newHeads
string

It fires a notification each time a new header is appended to the chain, including chain reorganizations

logs
string

It returns logs that are included in new imported blocks and match the given filter criteria

newPendingTransactions
string

It returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node

syncing
string

It fires a notification when the sync status of the node changes. The result is false when the node is not syncing

flag
boolean

If true, method will return the full transaction data, otherwise only the transaction hash

data
object

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. A maximum of four topic positions is allowed; requests with more return error -32602. Each log notification includes the blockTimestamp field

Returns

result
string

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
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