trace_transaction
Last updated:
`trace_transaction` re-executes a transaction that has already been included in a block and returns a **flat list of action traces** — one entry per call frame (the top-level call plus every internal `CALL`, `DELEGATECALL`, `CREATE`, and `SELFDESTRUCT` it triggered). This is the OpenEthereum / Parity `trace` format: instead of the nested call tree produced by [`debug_traceTransaction`](./debug_traceTransaction.md)'s `callTracer`, each frame is a separate array element, and its position in the call hierarchy is encoded by the `traceAddress` path.
Use it when you want a compact, post-hoc accounting of value movement and internal calls — for example reconstructing internal ETH transfers, attributing gas across sub-calls, or finding exactly which frame reverted. Because the output is flat and value-oriented (rather than opcode-level), it is much smaller than a struct log and is the trace format most block explorers and accounting tools expect.
This is a `trace`-namespace method available on the **Pro** tier and above. It is rate limited per tier (5 RPS on Pro, 15 RPS on Business) with a short burst allowance; there is no daily quota. The transaction must already be mined — to trace a transaction you have not yet sent, simulate it first.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"trace_transaction","params":[]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "trace_transaction",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"trace_transaction","params":[],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- Credit cost: 5 per call.
FAQ
- What does trace_transaction do?
- Returns the OpenEthereum-style action traces for every call frame inside a single already-mined transaction.
- How many credits does trace_transaction cost?
- trace_transaction costs 5 credit(s) per call on Triport by default.
- Is trace_transaction available over WebSocket?
- trace_transaction is an HTTP JSON-RPC method.