Parameters
- subscription namestringREQUIRED
The type of event you want to subscribe to (i.e. newHeads, logs). This method supports the following subscription types:
- newHeadsstring
It fires a notification each time a new header is appended to the chain, including chain reorganizations
- logsstring
It returns logs that are included in new imported blocks and match the given filter criteria
- dataobject
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
- resultstring
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": "0xcd0c3e8af590364c09d0fa6a1210faf5"5}
1{2"jsonrpc": "2.0",3"id": 1,4"result": "0xcd0c3e8af590364c09d0fa6a1210faf5"5}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free