Ethereum

Ethereum

trace_block

trace_block takes a single Ethereum block and hands back the call-tree traces for every transaction it contains, flattened into one array. This is the Parity/OpenEthereum-style trace namespace, served on Ethereum mainnet (chain ID 1) by Erigon-class archive nodes. Where trace_transaction gives you one transaction, this gives you the whole block in a single round trip: every internal ETH transfer, every nested contract call, every CREATE and SELFDESTRUCT, each tagged with a transactionPosition so you know which transaction it came from. Point it at https://ethereum.therpc.io/YOUR_API_KEY and pass either a hex block number or one of the usual tags (latest, earliest, pending).

Use cases

  • Pull every internal transaction in a block in one call so an explorer or analytics pipeline can index ETH movements that never surfaced as an ERC-20 event or log.
  • Study MEV at the block level. Because traces arrive in execution order across all transactions, you can spot sandwich attacks, backruns, and atomic arbitrage that span several transactions in the same slot.
  • Follow value into and out of a single contract for the entire block, summing the internal transfers that touch an Aave pool or Uniswap router during those 12 seconds.

Parameters

#NameTypeRequiredDescription
1blockParameterstringYesBlock whose transactions to trace.

Response

TypeDescription
arrayFlat array of all trace objects across all transactions in the block. Each object has the same shape as individual entries from trace_transaction, with `transactionPosition` indicating which transaction it belongs to.

Example request

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

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32601Method not foundtrace namespace not enabled or not supported by this client.
-32602Invalid paramsblockParameter is malformed or not a recognized tag.
-32000block not foundBlock does not exist or trace archive data is unavailable.

Common pitfalls

  • It returns every trace for every transaction, so a busy mainnet block packed with DEX routing and bot activity can yield a very large JSON payload. Budget for the bandwidth and parsing cost.
  • You need a trace-enabled archive node. The plain trace namespace is not part of a default Geth full node, and most public RPC endpoints leave it off.
  • Avoid pending for anything you'll persist. Under proof-of-stake a head block can still reorg before justification, so read a block you've confirmed is finalized (roughly 12.8 minutes deep) when the data has to be durable.

Supported networks

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

See also

Parameters

hex block number or "latest" | "earliest" | "pending"

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

Ready to call this in production?

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