Ethereum

Ethereum

txpool_status

txpool_status is the lightweight counterpart to txpool_inspect: instead of listing the mempool's contents, it just counts them. It comes from Geth's txpool namespace and returns two hex-encoded integers — pending, the transactions ready to be included at their sender's current nonce, and queued, the ones held back behind a nonce gap. Together they tell you how deep the backlog is on an Ethereum node without dragging the full set of transaction objects across the wire. Send it to https://ethereum.therpc.io/YOUR_API_KEY on mainnet (chain ID 1) whenever you want a fast pulse on how busy the pool is. On a quiet stretch pending might sit in the low thousands; during a popular ETH mint it can swell well beyond that.

Use cases

  • Watch the pending count to sense congestion early and nudge your EIP-1559 tip up when the backlog grows, so your ETH transactions still land in the next few blocks.
  • Drive a backlog gauge on an ops dashboard, decoding the two hex counts to base 10 and plotting them slot over slot.

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://ethereum.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 Ethereum playground.

Errors & troubleshooting

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

Common pitfalls

  • The txpool namespace is a Geth thing. A node on a different client, or one that has not exposed the namespace, returns method not found rather than the counts.
  • The numbers are a snapshot of one node at one instant, and the mempool turns over every 12-second slot as blocks land and new transactions arrive. Poll it fresh when you need a current reading; do not cache the result for long.

Supported networks

  • Mainnet — Chain ID: 1
  • Sepolia — Chain ID: 11155111

See also

curl https://ethereum.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.