Skip to main content

eth_unsubscribe

The eth_unsubscribe method allows clients to unsubscribe from specific events on the Ethereum network, to which they have previously subscribed using the eth_subscribe method. The client needs to provide the subscription ID obtained from eth_subscribe to stop receiving notifications for the corresponding event.

Params

(1)

1. subscriptionId (required)

string

The unique subscription ID obtained from the eth_subscribe method, used to identify the subscription to be unsubscribed.

Result

(unsubscribed)

A boolean value indicating whether the unsubscription was successful.

boolean

Example

Request

await window.ethereum.request({
"method": "eth_unsubscribe",
"params": [
"0x1b84f2cdf29a204b79e450c1939b30c1"
]
});

Result

true

Params

subscriptionId


Request

await window.ethereum.request({
"method": "eth_unsubscribe",
"params": [
null
]
});