eth_subscribe

Creates a subscription to receive real-time updates for various events on the Ethereum blockchain

Request
Examples

wscat -c wss://rpc.xone.org

{"jsonrpc":"2.0","id": 2, "method": "eth_subscribe", "params": ["newHeads"]}'
Response
200 OK
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1234567890abcdef1234567890abcdef"
}

Request params

NameTypeDescription
idintegerRequest identifier
jsonrpcstringJSON-RPC version
methodstringAPI method name
Parametersarray of strings 
subscription_namestringSpecifies the event type for subscription. Supported types include:
dataobjectIs specifically used for logs subscriptions. Arguments like address, multiple addresses, and topics.

Response

200
The subscription ID, represented as a hexadecimal string.
NameTypeDescription
Parametersobject 
idinteger
jsonrpcstring
resultstring