Links

eth_unsubscribe

unsubscribe on chain topic.
You can unsubscribe event via our eth_unsubscribe service.

Parameters

  • subscription ID(hex string, required) - subscription id.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(boolean) - true if successfully unsubscribe, false if unsubscribe failed.

Example

Request

curl
TypeScript
curl --location --request POST 'https://apis.blockvision.org/v1/<api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_unsubscribe",
"params": ["0xe071a7e76d4b60755770076b4a79a40d"],
"id": 1
}'
import { BlockvisionProvider, BvNetwork } from 'blockvision-sdk'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockvisionProvider(BvNetwork['ETH_MAINNET'])
// Access the BlockVision Mempool API
bv.getUnsubscribe('0xe071a7e76d4b60755770076b4a79a40d').then(console.log)

Result

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