eth_unsubscribe
Returns true if unsubscribed successfully, otherwise false.
You can unsubscribe event via our eth_unsubscribe service.
Params
- a string array containing (required):subscription ID(hex string, required)
- subscription id.
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.
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.js'
// 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)
{
"jsonrpc":"2.0",
"id":1,
"result":true
}
Last modified 3mo ago