Skip to main content

eth_unsubscribe

Ethereum API

Unsubscribes from specific events on the Ethereum network, to which the client has been previously subscribed using eth_subscribe. The client must 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 eth_subscribe, 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
]
});