POST
/
eth_subscribe
curl --request POST \
  --url https://api.mainnet.abs.xyz/eth_subscribe \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x9cef478923ff08bf67fde6c64013158d"
}

Body

application/json
jsonrpc
string
default:2.0
required

JSON-RPC version

method
string
default:eth_subscribe
required

The method to call

id
integer
required

Request identifier

Example:

1

params
array

Parameters for the subscription

Name of the subscription (e.g., 'newHeads', 'logs')

Example:
["newHeads"]

Response

200 - application/json
A subscription ID used to identify and manage the subscription
jsonrpc
string
Example:

"2.0"

id
integer
Example:

1

result
string

Subscription ID

Example:

"0x9cef478923ff08bf67fde6c64013158d"