BNB Smart Chain

BNB Smart Chain

txpool_status

For a lightweight read on how busy BNB Smart Chain is right now, txpool_status is the cheapest probe in the geth-family txpool namespace. Rather than dumping the whole mempool, it returns just two hex-encoded integers: the number of pending transactions ready to be included and the number of queued ones still blocked behind a nonce gap. On this BNB-fee network, where blocks land every few seconds, those two figures track congestion in near real time. Hit https://bsc.therpc.io/YOUR_API_KEY on chain ID 56, decode the pending and queued hex values, and you have an instant gauge of backlog depth.

Use cases

  • Sample the pending count on a short interval to detect rising BSC congestion and bump your submitted gas price before transactions stall.
  • Pipe the decoded totals into a dashboard gauge that visualises the current transaction backlog at a glance.

Parameters

This method takes no parameters. Pass an empty array [].

Response

TypeDescription
objectObject with `pending` (hex string) and `queued` (hex string) transaction counts.

Example request

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

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32601method not foundThe node does not support the txpool namespace.

Common pitfalls

  • As a geth-family namespace method, it is absent on nodes running unrelated client implementations, which will answer with a method-not-found error.
  • The two counts are instantaneous snapshots that churn every few seconds on BSC, so caching them aggressively will leave you acting on stale congestion data.

Supported networks

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

See also

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

Ready to call this in production?

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