BNB Smart Chain

BNB Smart Chain

eth_uninstallFilter

PancakeSwap swaps and Venus lending keep BEP-20 log volume high on BNB Smart Chain, the BNB-fee network. Every filter you open with eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter reserves polling state inside the node. eth_uninstallFilter tears that state back down. Hand it the hex filter ID and the node deletes the matching subscription, releasing whatever it was holding. Send the request to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56. The same call handles all three filter types, and it returns a boolean that tells you whether a live filter actually carried that ID.

Use cases

  • Release the node resources held by a BEP-20 transfer log filter the moment a monitoring session finishes, instead of waiting for the idle timeout.
  • Iterate over every filter ID your service opened and uninstall them in sequence during graceful application shutdown.

Parameters

#NameTypeRequiredDescription
1filterIdstringYesThe hex filter ID to remove.

Response

TypeDescription
boolean`true` if the filter was found and removed. `false` if it did not exist (already expired or never created).

Example request

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": ["0x1"],
"id": 1
}'

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32602invalid argumentThe filter ID is not a valid hex string.

Common pitfalls

  • A false result is not a failure. It means no live filter carried that ID, usually because the filter already lapsed on its own. Treat it as an idempotent confirmation rather than an error.
  • Idle filters get reaped automatically after roughly five minutes. On a busy BSC node, calling this method explicitly keeps memory pressure down instead of leaning on that timeout.

Supported networks

  • Mainnet — Chain ID: 56
  • Testnet — Chain ID: 97

See also

Parameters

The hex filter ID to remove.

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_uninstallFilter","params":["0x1"]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.