eth_unsubscribe
Cancel subscriptions by calling this method with the subscription ID. It returns a boolean indicating that the subscription was canceled successfully.
Parameters
subscription ID
: The ID of the subscription you want to unsubscribe.
Returns
unsubscribed flag
: (boolean)True
if the subscription is canceled successfully.
Example
Replace <YOUR-API-KEY>
with an API key from your MetaMask Developer dashboard.
WebSocket connections only
Subscription methods are available for WebSocket connections only.