eth_unsubscribe - Ethereum

Cancels subscriptions via a regular RPC call. You should state eth_unsubscribe as a method and write a subscription id in the place of the first param. Works only for websockets

How to Use the eth_unsubscribe Method

Parameters

SUBSCRIPTION ID.

What you receive

Boolean, true in case of successful uninstallment.

Sample

Here is a typical appliance example.

Call

curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_unsubscribe","params":["0x9cef478923ff08bf67fde6c64013158d"],"id":1}'

Outcome

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Last updated