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

# ots_searchTransactionsBefore

> Address history navigation method.

### Parameters

<ParamField query="chainId" type="string" default="1" 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="ots_searchTransactionsBefore" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={["0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",0,5]} placeholder="[&#x22;0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95&#x22;,0,5]" required>
  The parameters for method ots\_searchTransactionsBefore: \[address, defaultBlock, pageSize].

  Positional parameters for <code>ots\_searchTransactionsBefore</code>:

  <ul>
    <li><code>params\[0]</code>: The address.</li>
    <li><code>params\[1]</code>: Block identifier. Can be an integer block number or a string tag: "latest", "earliest", or "pending".</li>
    <li><code>params\[2]</code>: The page size for the number of results to return.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  Paginated list of transactions and receipts for a given address before or after a specified block number.

  <Expandable title="properties">
    <ResponseField name="txs" type="array">
      List of transactions (inbound, outbound, or internal) touching the target address, sorted from most recent to oldest.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          <Expandable title="properties">
            <ResponseField name="hash" type="string">
              Transaction hash.
            </ResponseField>

            <ResponseField name="from" type="string">
              Sender address.
            </ResponseField>

            <ResponseField name="to" type="string">
              Recipient address, or null if contract creation.
            </ResponseField>

            <ResponseField name="value" type="string">
              Amount of ETH transferred, in hexadecimal Wei.
            </ResponseField>

            <ResponseField name="gas" type="string" />

            <ResponseField name="gasPrice" type="string" />

            <ResponseField name="input" type="string">
              Method selector or calldata (possibly truncated).
            </ResponseField>

            <ResponseField name="blockHash" type="string" />

            <ResponseField name="blockNumber" type="string" />

            <ResponseField name="transactionIndex" type="string" />

            <ResponseField name="type" type="string">
              Transaction type: "external", "internal", or "contract".
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="receipts" type="array">
      List of receipts corresponding to the returned transactions.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          <Expandable title="properties">
            <ResponseField name="transactionHash" type="string" />

            <ResponseField name="transactionIndex" type="string" />

            <ResponseField name="blockHash" type="string" />

            <ResponseField name="blockNumber" type="string" />

            <ResponseField name="from" type="string" />

            <ResponseField name="to" type="string" />

            <ResponseField name="cumulativeGasUsed" type="string" />

            <ResponseField name="gasUsed" type="string" />

            <ResponseField name="contractAddress" type="string" />

            <ResponseField name="status" type="string" />

            <ResponseField name="logs" type="string">
              Logs are omitted to reduce payload size.
            </ResponseField>

            <ResponseField name="logsBloom" type="string">
              Logs bloom is omitted to reduce payload size.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="firstPage" type="boolean">
      True if this page starts from the most recent block (for `Before`) or if no more results follow (for `After`).
    </ResponseField>

    <ResponseField name="lastPage" type="boolean">
      True if this page reaches the genesis block (for `After`) or no more results follow (for `Before`).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=1 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "ots_searchTransactionsBefore",
      "params": [
        "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",
        0,
        5
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {}
  }
  ```
</ResponseExample>
