> ## 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_filter

Returns traces matching given filter.

This method will use `80` [Compute Units](/nodeapi/about/billing).

***

## **Parameters**

`object` - object - The filter object

* `fromBlock` - string - The starting block number for the filter in hexadecimal format
* `toBlock` - string - The ending block number for the filter in hexadecimal format
* `fromAddress` - array - An array of sender addresses to filter by
* `toAddress` - array - An array of receiver addresses to filter by
* `after` - integer - The offset trace number for pagination
* `count` - integer - The number of traces to display in a batch

## **Returns**

`result` - array - An array of trace objects that match the given filter

* `action` - object - The trace action object containing details of the call
  * `from` - string - The address of the sender
  * `callType` - string - The type of method such as call, delegatecall, staticcall
  * `gas` - string - The gas provided by the sender encoded as hexadecimal
  * `input` - string - The data sent along with the transaction
  * `to` - string - The address of the receiver
  * `value` - string - The value sent with this transaction encoded as hexadecimal
* `blockHash` - string - The hash of the block containing this transaction
* `blockNumber` - integer - The block number containing this transaction
* `result` - object - The execution result object of the trace
  * `gasUsed` - string - The amount of gas used by this specific trace
  * `output` - string - The value returned by the call, empty if no RETURN was executed
* `subtraces` - integer - The number of subtraces (internal calls) in this trace
* `traceAddress` - array - The list showing the nested call structure of this trace
* `transactionHash` - string - The hash of the transaction
* `transactionPosition` - integer - The transaction index position within the block
* `type` - string - The type of 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": "0xe1d9b2b918e7bf4c27b108c7d78c839356b7c69f",
                "callType": "call",
                "gas": "0x2d7308",
                "input": "0x322f62ba00000000000000000000000035e4876102389f13d78381d317ff4612412a56c9",
                "to": "0xf0542ed44d268c85875b3b84b0e7ce0773e9aeef",
                "value": "0x16345785d8a0000"
            },
            "blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
            "blockNumber": 10000000,
            "result": {
                "gasUsed": "0x3ed3d",
                "output": "0x"
            },
            "subtraces": 1,
            "traceAddress": [],
            "transactionHash": "0xc2f74145a896b6a5b938216d130f5c382d3d77d5d501ab41e43681cbebcf3b97",
            "transactionPosition": 21,
            "type": "call"
        }
    ]
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x989680","toBlock":"0x989680","toAddress":["0xf0542ed44d268c85875b3b84b0e7ce0773e9aeef"],"count":1}],"id":1}'
      
  ```

  ```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x4C4B40","toBlock":"0x4C4B40","toAddress":["0x21ceb5a916ced2ad8072c9a8cf7a93ff452cd61c"],"count":1}],"id":1}'
  ```
</CodeGroup>


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