Skip to main content

eth_unsubscribe

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.

Parameters

subscriptionId(string)required

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

Returns

A boolean value indicating whether the unsubscription was successful.

Example request
await provider.request({
method: 'eth_unsubscribe',
params: ['0x1b84f2cdf29a204b79e450c1939b30c1'],
})
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": true
}