Log In

eth_unsubscribe - Optimism

Subscriptions are canceled with a regular RPC call with eth_unsubscribe as method and the subscription id as first parameter. It returns a bool indicating if the subscription was canceled successfully.

Parameters

  • subscription id

Example

Request

wscat -c wss://https://opt-mainnet.unifra.io/v1/your-api-key

{"jsonrpc":"2.0","method":"eth_subscribe","params":["0x9cef478923ff08bf67fde6c64013158d"],"id":1}

Result

{
	"jsonrpc": "2.0",
	"id": 1,
	"result": true
}