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

# Wallet

> Per-wallet activity summary, top pairs, frequent counterparts, and a 365-day heatmap

## Endpoint

```
GET /leokit/explorer/wallet/{addr}
```

No authentication required. Cached for 60 seconds.

## Request

| Path parameter | Type   | Required | Description                    |
| -------------- | ------ | -------- | ------------------------------ |
| `addr`         | string | Yes      | Wallet address (max 200 chars) |

The endpoint uses case-insensitive matching, so EVM addresses match in any case.

## Response

```json theme={null}
{
  "data": {
    "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "summary": {
      "total_volume_usd": 482015.67,
      "transaction_count": 122,
      "received_count": 14,
      "first_seen": "2025-08-15T09:14:22.000Z",
      "last_seen": "2026-04-27T18:32:11.000Z",
      "avg_swap_usd": 3950.95
    },
    "relations": {
      "frequent_counterparts": [
        { "address": "bc1q...", "count": 14, "volume_usd": 122480.55 }
      ],
      "received_from": [
        { "address": "0x1234...", "count": 3, "volume_usd": 9420.10 }
      ]
    },
    "top_pairs": [
      {
        "from_symbol": "USDC",
        "to_symbol": "BTC",
        "from_asset": "ETH.USDC-0xA0b...",
        "to_asset": "BTC.BTC",
        "count": 24,
        "volume_usd": 122480.55
      }
    ],
    "volume_timeline": [
      { "date": "2026-04-01", "count": 4, "volume_usd": 12480.55 }
    ],
    "activity_heatmap": [
      { "date": "2026-04-28", "count": 3 }
    ],
    "recent_txs": [
      /* up to 10 ExplorerTransaction objects, newest first */
    ]
  }
}
```

## Field Reference

#### `summary`

| Field               | Description                                                      |
| ------------------- | ---------------------------------------------------------------- |
| `total_volume_usd`  | USD volume sent (where address is `from_address`)                |
| `transaction_count` | Swaps initiated by this wallet                                   |
| `received_count`    | Swaps where this wallet was the recipient (excluding self-sends) |
| `first_seen`        | Oldest swap timestamp (ISO-8601)                                 |
| `last_seen`         | Most recent swap timestamp                                       |
| `avg_swap_usd`      | `total_volume_usd / transaction_count`                           |

#### `relations`

| Field                   | Description                                                    |
| ----------------------- | -------------------------------------------------------------- |
| `frequent_counterparts` | Top 5 destination addresses this wallet sent to                |
| `received_from`         | Top 5 source addresses that sent here (and aren't this wallet) |

#### `top_pairs`

Top 8 sent-from-this-wallet pairs by count.

#### `volume_timeline`

Last 30 days, daily buckets. Days with no activity are omitted.

#### `activity_heatmap`

Last 365 days, daily buckets, count only (no volume). For dashboard heatmap rendering.

#### `recent_txs`

Up to 10 most recent swaps initiated by this wallet (`ExplorerTransaction` shape — see [overview](/api-reference/explorer/overview)).

## Errors

| Status | Description                             |
| ------ | --------------------------------------- |
| `400`  | Missing `addr` or longer than 200 chars |
| `404`  | No swaps found from or to this address  |

## Caching

`Cache-Control: public, max-age=60`. The cache is per-address.

## Examples

```bash theme={null}
curl "https://api.leokit.dev/leokit/explorer/wallet/0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
curl "https://api.leokit.dev/leokit/explorer/wallet/bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
curl "https://api.leokit.dev/leokit/explorer/wallet/thor1abc..."
```


## OpenAPI

````yaml /api-reference/openapi.json GET /explorer/wallet/{addr}
openapi: 3.0.3
info:
  title: Leokit API
  version: 1.0.0
  description: API reference for Leokit
servers:
  - url: https://api.leokit.dev
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /explorer/wallet/{addr}:
    get:
      summary: Per-wallet activity
      parameters:
        - name: addr
          in: path
          required: true
          schema:
            type: string
            maxLength: 200
      responses:
        '200':
          description: Wallet summary, top pairs, heatmap, recent txs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExplorerWalletResponse'
      security:
        - {}
components:
  schemas:
    ExplorerWalletResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          properties:
            address:
              type: string
            summary:
              type: object
              properties:
                total_volume_usd:
                  type: number
                transaction_count:
                  type: integer
                received_count:
                  type: integer
                first_seen:
                  type: string
                  format: date-time
                last_seen:
                  type: string
                  format: date-time
                avg_swap_usd:
                  type: number
            relations:
              type: object
              properties:
                frequent_counterparts:
                  type: array
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                      count:
                        type: integer
                      volume_usd:
                        type: number
                received_from:
                  type: array
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                      count:
                        type: integer
                      volume_usd:
                        type: number
            top_pairs:
              type: array
              items:
                type: object
                additionalProperties: true
            volume_timeline:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                  count:
                    type: integer
                  volume_usd:
                    type: number
            activity_heatmap:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                  count:
                    type: integer
            recent_txs:
              type: array
              items:
                $ref: '#/components/schemas/ExplorerTransaction'
    ExplorerTransaction:
      type: object
      required:
        - id
        - tx_hash
        - from_asset
        - to_asset
        - from_address
        - to_address
        - volume_usd
        - protocol
        - swap_date
      properties:
        id:
          type: string
        tx_hash:
          type: string
        from_asset:
          type: string
        to_asset:
          type: string
        from_address:
          type: string
        to_address:
          type: string
        volume_usd:
          type: number
        protocol:
          type: string
        swap_date:
          type: string
          format: date-time
        from_symbol:
          type: string
        to_symbol:
          type: string
        from_chain:
          type: string
        to_chain:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: 'Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4'

````