BNB Smart Chain
BNB Smart Chain
eth_newPendingTransactionFilter
BNB Smart Chain operates as chain ID 56 and meters gas in BNB, and eth_newPendingTransactionFilter lets you observe its mempool as transactions queue up ahead of the next ~3-second PoSA block. Directed at https://bsc.therpc.io/YOUR_API_KEY, it creates a server-side filter for incoming pending transactions and returns a hex filter ID. Poll that ID with eth_getFilterChanges and the node hands back the hashes of pending transactions it has seen since your last poll, giving polling clients a mempool feed without keeping a WebSocket open to BNB Smart Chain.
Use cases
- Watch the BNB Smart Chain mempool for pending transactions originating from a particular sender so you can react before they are mined.
- Build a live gas-price gauge by sampling the fees attached to pending transactions and charting BNB tip levels over time.
Parameters
This method takes no parameters. Pass an empty array [].
Response
| Type | Description |
|---|---|
| string | Hex filter ID. When polled with eth_getFilterChanges, yields an array of new pending transaction hashes since the last poll. |
Example request
Try it live in the BNB Smart Chain playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
Common pitfalls
- Each poll delivers nothing but transaction hashes; resolve the full body with
eth_getTransactionByHashwhen you need sender, value, or calldata. - A pending transaction may never make it into a block or may be replaced by a higher-fee one with the same nonce, so never count it as confirmed.
- When BNB Smart Chain is congested the mempool can balloon and flood each poll with thousands of hashes; for sustained real-time use prefer an
eth_subscribenewPendingTransactionsstream over WebSocket.
Supported networks
- Mainnet — Chain ID: 56
- Testnet — Chain ID: 97