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

# Get Transaction History

> Get transaction history for a wallet

<Note>
  **SDK Alternative**: Use `agent.transactions()` for a simpler TypeScript interface. [See SDK docs](/sdk-reference/agent/transactions)
</Note>

## Description

Retrieves paginated transaction history for a wallet including deposits, withdrawals, swaps, and rebalancing operations.

## Path Parameters

<ParamField path="chain_id" type="integer" required>
  The blockchain chain ID
</ParamField>

<ParamField path="wallet" type="string" required>
  The wallet address
</ParamField>

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number (starts at 1)
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Number of items per page (max 100)
</ParamField>

<ParamField query="sort" type="string" default="date_desc">
  Sort order: `date_desc` or `date_asc`
</ParamField>

## Response

<ResponseField name="transactions" type="array">
  Array of transactions

  <Expandable>
    <ResponseField name="action" type="string">
      Transaction type: `deposit`, `withdraw`, `swap`, `transfer`, `bridge`, `approve`
    </ResponseField>

    <ResponseField name="date" type="string">
      ISO timestamp
    </ResponseField>

    <ResponseField name="amount" type="number">
      Transaction amount
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Token address
    </ResponseField>

    <ResponseField name="status" type="string">
      Status: `pending`, `approved`, `cancelled`, `failed`
    </ResponseField>

    <ResponseField name="transaction_hash" type="string">
      Blockchain transaction hash
    </ResponseField>

    <ResponseField name="protocol" type="string">
      Associated protocol (if applicable)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination info

  <Expandable>
    <ResponseField name="total_items" type="integer">
      Total number of transactions
    </ResponseField>

    <ResponseField name="total_pages" type="integer">
      Total number of pages
    </ResponseField>

    <ResponseField name="current_page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="items_per_page" type="integer">
      Items per page
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../transactions?page=1&limit=20&sort=date_desc"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../transactions?page=1&limit=20'
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "transactions": [
      {
        "action": "deposit",
        "date": "2024-01-15T10:30:00Z",
        "amount": 1000000000,
        "token_type": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "status": "approved",
        "transaction_hash": "0xabc...",
        "protocol": "aave"
      },
      {
        "action": "swap",
        "date": "2024-01-16T08:00:00Z",
        "amount": 500000000,
        "token_type": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "status": "approved",
        "transaction_hash": "0xdef...",
        "protocol": "compound",
        "new_token": "0x..."
      }
    ],
    "pagination": {
      "total_items": 15,
      "total_pages": 1,
      "current_page": 1,
      "items_per_page": 20
    }
  }
  ```
</ResponseExample>
