eth_unsubscribe
Cancel subscriptions by calling eth_unsubscribe with the subscription ID. It returns a boolean indicating that the subscription was canceled successfully.

REQUEST PARAMS

  • SUBSCRIPTION ID [required]

EXAMPLE

>wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY
>{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}

RESPONSE

RESULT FIELDS

  • UNSUBSCRIBED FLAG - true if the subscription is canceled successfully.

BODY

{
"id": 1,
"jsonrpc": "2.0",
"result": true
}
Copy link
On this page
REQUEST PARAMS
RESPONSE