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

# trace_filter

> Returns traces matching given filter.

### Parameters

<ParamField query="chainId" type="string" default="10" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="trace_filter" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={[{"fromBlock":"0x2ed0c4","toBlock":"0x2ed128","toAddress":["0x8bbB73BCB5d553B5A556358d27625323Fd781D37"],"after":1000,"count":100}]} placeholder="[{&#x22;fromBlock&#x22;:&#x22;0x2ed0c4&#x22;,&#x22;toBlock&#x22;:&#x22;0x2ed128&#x22;,&#x22;toAddress&#x22;:[&#x22;0x8bbB73BCB5d553B5A556358d27625323Fd781D37&#x22;],&#x22;after&#x22;:1000,&#x22;count&#x22;:100}]" required>
  Parameters for method trace\_filter: \[filterObject]

  Positional parameters for <code>trace\_filter</code>:

  <ul>
    <li><code>params\[]</code>: Filter options used to create a new filter for logs. Topics are order-dependent. Nulls or nested arrays are used to match multiple possibilities.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="array">
  Array - Traces matching given filter

  <Expandable title="items">
    <ResponseField name="items[]" type="array">
      Traces matching given filter.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          <Expandable title="properties">
            <ResponseField name="action" type="object">
              Details of the trace action.

              <Expandable title="properties">
                <ResponseField name="callType" type="string">
                  Type of call (e.g., "call", "delegatecall", etc.).
                </ResponseField>

                <ResponseField name="from" type="string">
                  Address that initiated the action.
                </ResponseField>

                <ResponseField name="gas" type="string">
                  Gas provided for the action (hex string).
                </ResponseField>

                <ResponseField name="input" type="string">
                  Input data for the action (hex string).
                </ResponseField>

                <ResponseField name="to" type="string">
                  Recipient address (if applicable).
                </ResponseField>

                <ResponseField name="value" type="string">
                  Value transferred in Wei (hex string).
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="blockHash" type="string">
              Hash of the block in which this trace occurred.
            </ResponseField>

            <ResponseField name="blockNumber" type="integer">
              Block number in which this trace occurred.
            </ResponseField>

            <ResponseField name="result" type="object">
              Result of the trace action.

              <Expandable title="properties">
                <ResponseField name="gasUsed" type="string">
                  Gas used during this action (hex string).
                </ResponseField>

                <ResponseField name="output" type="string">
                  Returned output data (hex string).
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="subtraces" type="integer">
              Number of nested trace steps inside this trace.
            </ResponseField>

            <ResponseField name="traceAddress" type="array">
              Path to this trace in the nested trace structure.

              <Expandable title="items">
                <ResponseField name="items[]" type="integer" />
              </Expandable>
            </ResponseField>

            <ResponseField name="transactionHash" type="string">
              Hash of the transaction this trace belongs to.
            </ResponseField>

            <ResponseField name="transactionPosition" type="integer">
              Index position of the transaction within the block.
            </ResponseField>

            <ResponseField name="type" type="string">
              Type of trace (e.g., "call", "create", "suicide").
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=10 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "trace_filter",
      "params": [
        {
          "fromBlock": "0x2ed0c4",
          "toBlock": "0x2ed128",
          "toAddress": [
            "0x8bbB73BCB5d553B5A556358d27625323Fd781D37"
          ],
          "after": 1000,
          "count": 100
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      {
        "action": {
          "callType": "call",
          "from": "0x32be343b94f860124dc4fee278fdcbd38c102d88",
          "gas": "0x4c40d",
          "input": "0x",
          "to": "0x8bbb73bcb5d553b5a556358d27625323fd781d37",
          "value": "0x3f0650ec47fd240000"
        },
        "blockHash": "0x86df301bcdd8248d982dbf039f09faf792684e1aeee99d5b58b77d620008b80f",
        "blockNumber": 3068183,
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x3321a7708b1083130bd78da0d62ead9f6683033231617c9d268e2c7e3fa6c104",
        "transactionPosition": 3,
        "__truncated": true
      }
    ]
  }
  ```
</ResponseExample>
