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
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockParameter | string | Yes | Block whose transactions to trace. |
Response
| Type | Description |
|---|---|
| array | Flat 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
Try it live in the Ethereum playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or not a recognized tag. |
-32000 | block not found | Block 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
tracenamespace is not part of a default Geth full node, and most public RPC endpoints leave it off. - Avoid
pendingfor anything you'll persist. Under proof-of-stake a head block can still reorg before justification, so read a block you've confirmed isfinalized(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"