Skip to main content
POST
trace_transaction
curl --request POST \
  --url https://tempo-moderato.core.chainstack.com/a25a421add2280d53fdbc23417055501/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "trace_transaction",
  "params": [
    "0xb3e821e696897b02283b7b2d602941b1d3cb08448d3a204bab05955215fc2035"
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    {}
  ]
}
Tempo API method that returns execution traces for a specific transaction. This provides detailed call-level traces using the Parity/OpenEthereum trace format.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • transactionHash — the hash of the transaction to trace

Response

  • result — array of trace objects for the transaction:
    • action — the action object:
      • from — sender address
      • to — recipient address
      • callType — type of call (call, delegatecall, staticcall, etc.)
      • gas — gas provided
      • input — call data
      • value — value transferred
    • blockHash — hash of the block
    • blockNumber — block number
    • result — the result object:
      • gasUsed — gas consumed
      • output — return data
    • subtraces — number of child traces
    • traceAddress — position in the trace tree
    • transactionHash — hash of the transaction
    • transactionPosition — index of the transaction in the block
    • type — trace type (call, create, suicide, reward)

trace_transaction code examples

const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

const traceTransaction = async (txHash) => {
    const traces = await provider.send("trace_transaction", [txHash]);

    console.log(`Transaction has ${traces.length} traces`);

    for (const trace of traces) {
      const indent = "  ".repeat(trace.traceAddress.length);
      const callType = trace.action.callType || trace.type;
      const to = trace.action.to || "Contract Creation";

      console.log(`${indent}[${trace.traceAddress.join(",")}] ${callType}`);
      console.log(`${indent}  From: ${trace.action.from}`);
      console.log(`${indent}  To: ${to}`);
      console.log(`${indent}  Gas Used: ${trace.result?.gasUsed || "N/A"}`);

      if (trace.error) {
        console.log(`${indent}  Error: ${trace.error}`);
      }
    }
  };

traceTransaction("0xb3e821e696897b02283b7b2d602941b1d3cb08448d3a204bab05955215fc2035");

Body

application/json
jsonrpc
string
default:2.0
method
string
default:trace_transaction
params
any[]

Transaction hash

id
integer
default:1

Response

200 - application/json

Transaction traces

jsonrpc
string
id
integer
result
object[]

Array of trace objects

Last modified on January 28, 2026