> For the complete documentation index, see [llms.txt](/llms.txt).

# `trace_call`

Executes the given call and returns a number of possible traces for it. Use this API to retrieve detailed information about the transaction execution, including state changes and logs generated during the process. This method uses [300 credits](/services/get-started/pricing/) from your daily balance.

## Parameters[​](#parameters "Direct link to Parameters")

- `transaction call object` _[Required]_ with the following keys and their values:  
  - `from`: 20 bytes. The address the transaction is sent from.
  - `to`: 20 bytes. The address the transaction is directed to.
  - `gas`: _[optional]_ The gas provided for the transaction execution, in hexadecimal.
  - `gasPrice`: _[optional]_ The gas price used for each paid gas, in hexadecimal.
  - `maxPriorityFeePerGas`: _[optional]_ Maximum fee, in wei, the sender is willing to pay per gas above the base fee. See [EIP-1559 transactions](/services/concepts/transaction-types/#eip-1559-transactions).
  - `maxFeePerGas`: _[optional]_ Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. See [EIP-1559 transactions](/services/concepts/transaction-types/#eip-1559-transactions).
  - `value`: _[optional]_ The value sent with this transaction, in hexadecimal.
  - `data`: _[optional]_ The hash of the method signature and encoded parameters. See the [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html).
- `block parameter` : _[Required]_ The hexadecimal block number, or the string `latest`, `earliest`, or `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block).
- `options`: A list of tracing options. Tracing options are [trace](/services/reference/ethereum/json-rpc-methods/trace-methods/#trace) and [stateDiff](/services/reference/ethereum/json-rpc-methods/trace-methods/#statediff).

## Returns[​](#returns "Direct link to Returns")

- `result`: A trace object that includes the [trace](/services/reference/ethereum/json-rpc-methods/trace-methods/#trace) and [stateDiff](/services/reference/ethereum/json-rpc-methods/trace-methods/#statediff).

## Example[​](#example "Direct link to Example")

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request[​](#request "Direct link to Request")

- curl
- WSS

```
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "trace_call", "params": [{"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "to": "0x0010000000000000000000000000000000000000", "gas": "0xfffff2", "gasPrice": "0xef", "value": "0x0", "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "nonce": "0x0"}, ["trace"], "latest"], "id": 1}'

```

```
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "trace_call", "params": [{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "to": 0x0010000000000000000000000000000000000000", "gas": "0xfffff2", "gasPrice": "0xef", "value": "0x0", "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "nonce": "0x0"}, ["trace"], "latest"], "id":1}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "callType": "call",
          "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
          "gas": "0xffabba",
          "input": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002",
          "to": "0x0010000000000000000000000000000000000000",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x9c58",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  },
  "id": 2
}

```
