Last updated 5 months ago
Was this helpful?
Cancels an existing subscription so that no further events are sent.
This method will use 10 .
10
subscription name - string, same as previously returned from an call
subscription name
params: [ "0x5302037dae412a3454143512a3c7617b", ]
true if a subscription was successfully cancelled, or false if no subscription existed with the given ID.
true
false
// Result { "jsonrpc": "2.0", "id": 1, "result": true }
wscat -c wss:///mainnet.conflux.validationcloud.io/v1/wss/<YOUR_API_KEY_HERE> # wait for connection {"jsonrpc": "2.0", "id": 1, "method":"eth_subscribe","params":["newHeads"]} # subscription ID returned {"jsonrpc":"2.0","result":"0x5302037dae412a3454143512a3c7617b","id":1} # Use subscription ID to cancel {"id": 1, "jsonrpc": "2.0", "method": "eth_unsubscribe", "params": ["0x5302037dae412a3454143512a3c7617b"]} {"jsonrpc":"2.0","result":true,"id":1}
wscat -c wss:///testnet.conflux.validationcloud.io/v1/wss/<YOUR_API_KEY_HERE> # wait for connection {"jsonrpc": "2.0", "id": 1, "method":"eth_subscribe","params":["newHeads"]} # subscription ID returned {"jsonrpc":"2.0","result":"0x5302037dae412a3454143512a3c7617b","id":1} # Use subscription ID to cancel {"id": 1, "jsonrpc": "2.0", "method": "eth_unsubscribe", "params": ["0x5302037dae412a3454143512a3c7617b"]} {"jsonrpc":"2.0","result":true,"id":1}