Skip to content

eth_unsubscribe ​

served · same as reth

Stops a subscription on the same WebSocket.

When to use ​

Use it when you do not need the notifications of a subscription any more.

Example ​

The live example sends the request over HTTP, so the node refuses it. Over a WebSocket, the answer is true or false.

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x1"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_unsubscribe",
  "params": [
    "0x1"
  ]
}

Response ​

Live mainnet, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32603,
    "message": "Internal error"
  }
}

Over HTTP both nodes refuse it, with different codes (Cinder -32601, reth -32603).

Full response

Parameters ​

NameTypeRequiredMeaning
subscriptionIdhex stringyesThe ID that eth_subscribe returned.

Returns ​

true when the node stopped the subscription. false when the ID is unknown on this connection.

Notes and limits ​

  • Closing the WebSocket also stops all its subscriptions.

Errors ​

CodeMessageWhen
-32603Internal errorThe request came over HTTP.

Compared with reth ​

Over HTTP, the answer is the same as the answer of reth.

The live example above gives the same answer on Cinder and on reth 2.7.

eth_subscribe.

Schema (OpenRPC) ​

Parameter id: SubscriptionId
json
{
  "title": "Subscription id",
  "type": "string",
  "pattern": "^0x[0-9a-f]{32}$"
}
Result: boolean
json
{
  "type": "boolean"
}