> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# trace_get

Returns a single trace of a transaction, selected by its position in the transaction's trace tree.

This method will use `80` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

> [!NOTE]
>
> Traces need the state of the traced block, so World Chain Mainnet can trace the last 10,064 blocks, about 5.6 hours at World Chain's 2-second block time. Older blocks return JSON-RPC error `-32603` with a message that contains `insufficient changesets to revert to block`.

## **Parameters**

`hash` - String - Required - The hash of a transaction

`indices` - Array - Required - The index positions of the trace to return, as hexadecimal strings. `["0x0"]` returns the top-level call; `["0x0", "0x1"]` returns the second sub-call of the first call.

## **Returns**

`object` - The selected trace, which has the following fields (all return types are hexadecimal unless otherwise noted):

* `action` - object - The ParityTrace action object containing call details
  * `from` - string - The address of the sender
  * `callType` - string - The type of method such as call, staticcall, delegatecall
  * `gas` - string - The gas provided by the sender, encoded as hexadecimal
  * `input` - string - The input data sent along with the transaction
  * `to` - string - The address of the receiver
  * `value` - string - The integer of the value sent with this transaction, encoded as hexadecimal
* `blockHash` - string - The hash of the block where this transaction was included
* `blockNumber` - integer - The block number where this transaction was in
* `result` - object - The result of the trace execution
  * `gasUsed` - string - The amount of gas used by this specific trace
  * `output` - string - The return value of the contract call, empty if no RETURN executed
* `subtraces` - integer - The number of subtraces (internal calls) made by this trace
* `traceAddress` - array - The list of addresses where the call executed, including parent addresses and call order
* `transactionHash` - string - The hash of the transaction
* `transactionPosition` - integer - The transaction index position within the block
* `type` - string - The type of the trace, such as call or create

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "action": {
      "from": "0x009dcf67cc6d08394d72ddff30c14b7012896c29",
      "callType": "call",
      "gas": "0x8f47b",
      "input": "0x765e827f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000009dcf67cc6d08394d72ddff30c14b70...",
      "to": "0x0000000071727de22e5e9d8baf0edac6f37da032",
      "value": "0x0"
    },
    "blockHash": "0x8aa29d1d553e01967d72dea6f60cf1c07c6563c85fa673ebb1e5e17dd27d6bd9",
    "blockNumber": 38522624,
    "result": {
      "gasUsed": "0x5f002",
      "output": "0x"
    },
    "subtraces": 3,
    "traceAddress": [],
    "transactionHash": "0x976ede826ce145939ff1d6ba66d01aa5c8e9aea7fba57db427949a4516f870ce",
    "transactionPosition": 1,
    "type": "call"
  }
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.worldchain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"trace_get","params":["0x976ede826ce145939ff1d6ba66d01aa5c8e9aea7fba57db427949a4516f870ce",["0x0"]],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.