Ethereum

Ethereum

txpool_inspect

txpool_inspect opens a window onto an Ethereum node's mempool — the staging area where transactions wait before a validator includes them in a block. It belongs to Geth's txpool namespace and returns a human-readable text summary of everything the node is currently holding, split into pending (ready to be mined at the sender's current nonce) and queued (waiting on an earlier nonce or other gap). The output is keyed by sender address and then by nonce, with each entry condensed to a one-line string showing the recipient, the ETH value in wei, and the gas. Call it on mainnet (chain ID 1) at https://ethereum.therpc.io/YOUR_API_KEY when you need a quick eyeball view of what is sitting in the pool right now.

Use cases

  • Track down a stuck ETH transaction by finding the sender address and reading the nonce map to see whether it is pending or stranded in queued behind a missing nonce.
  • Audit what the pool is holding during a congestion spike, when EIP-1559 base fees climb and replacement transactions pile up faster than blocks can clear them.

Parameters

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

Response

TypeDescription
objectObject with `pending` and `queued` keys. Each is a map of sender address → nonce → human-readable string `"<to>: <value> wei + <gas> gas × <gasPrice> wei"`.

Example request

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

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32601method not foundThe node does not support the txpool namespace (e.g. non-Geth clients may omit it).

Common pitfalls

  • This lives in Geth's txpool namespace. Nodes running other clients, or Geth instances that have not enabled the namespace, will answer method not found, so do not assume it is universally available.
  • The summary strings are meant for a human reading a console, not for parsing. If you need structured transaction objects you can iterate over, reach for txpool_content instead.
  • On a busy mainnet node the pool can hold tens of thousands of transactions, and this call returns a line for every one of them. When you only need totals, txpool_status gives you the counts at a fraction of the payload size.

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_inspect","params":[]}'

Ready to call this in production?

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