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

# Wallets

> Aggregate stats, per-token breakdowns, and time-series performance for wallets

## `walletSummary`

Aggregate stats for up to 500 wallets in one request — trade counts, volume, realized PnL, realized PnL %, win rate, and activity windows.

By default this returns **lifetime** stats. Pass `fromTime` / `toTime` to constrain the summary to a time window. Like the trades queries, both accept either **milliseconds since epoch** as a decimal string or **ISO-8601 / RFC-3339**. `fromTime` is inclusive and `toTime` is exclusive.

### Arguments

| Name        | Type         | Required | Description                                        |
| ----------- | ------------ | -------- | -------------------------------------------------- |
| `addresses` | `[String!]!` | yes      | 1-500 wallet addresses. Each must be ≥ 32 chars.   |
| `fromTime`  | `String`     | no       | Inclusive lower bound. Ms-since-epoch or ISO-8601. |
| `toTime`    | `String`     | no       | Exclusive upper bound. Ms-since-epoch or ISO-8601. |

### Return type

```graphql theme={null}
type WalletSummary {
  address: String!
  totalTrades: Int!
  totalBuys: Int!
  totalSells: Int!
  buyRatio: Float!
  sellRatio: Float!
  totalVolumeSol: Float!
  totalVolumeUsd: Float!
  avgTradeSizeSol: Float!
  avgTradeSizeUsd: Float!
  largestTradeSol: Float!
  largestTradeUsd: Float!
  totalFees: Float!
  realizedPnlSol: Float!
  realizedPnlUsd: Float!
  realizedPnlPct: Float
  uniqueTokensTraded: Int!
  winningTokens: Int!
  winRate: Float!
  firstTradeAt: String!
  lastTradeAt: String!
  proTradeCount: Int!
  sniperCount: Int!
  bundleCount: Int!
  solPriceUsd: Float!
}
```

`realizedPnlPct` is calculated as `realizedPnlSol / buy-side SOL volume * 100` for the selected window. It returns `null` when the window has trades but no buy-side cost basis.

Returns one entry per input address, in input order. Addresses with no recorded activity are still returned with zero counts.

### Example

```graphql theme={null}
query WalletFolder($addresses: [String!]!, $from: String!, $to: String!) {
  walletSummary(addresses: $addresses, fromTime: $from, toTime: $to) {
    address
    realizedPnlSol
    realizedPnlPct
    winRate
    lastTradeAt
  }
}
```

```json theme={null}
{
  "addresses": [
    "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA",
    "4wuudpdbJzUFpsu1MgwbGEWg93NQcb9Wxyoaya9i7FMF"
  ],
  "from": "2026-04-01T00:00:00Z",
  "to": "2026-05-01T00:00:00Z"
}
```

***

## `walletTokens`

Per-token aggregate stats for one wallet — one row per `(wallet, mint)` pair.

### Arguments

| Name      | Type     | Required | Description                                                |
| --------- | -------- | -------- | ---------------------------------------------------------- |
| `address` | `String` | yes      | Wallet address (≥ 32 chars).                               |
| `limit`   | `Int`    | no       | Default `100`, max `200`.                                  |
| `offset`  | `Int`    | no       | Default `0`.                                               |
| `sort`    | `String` | no       | `"volume"` (default), `"trades"`, `"pnl"`, `"last_trade"`. |

### Return type

```graphql theme={null}
type WalletToken {
  mint: String!
  totalTrades: Int!
  buys: Int!
  sells: Int!
  totalVolumeSol: Float!
  buyVolumeSol: Float!
  sellVolumeSol: Float!
  realizedPnlSol: Float!
  firstTrade: String!
  lastTrade: String!
  totalFees: Float!
}
```

### Example

```graphql theme={null}
query {
  walletTokens(
    address: "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA"
    limit: 50
    sort: "pnl"
  ) {
    mint totalTrades totalVolumeSol realizedPnlSol firstTrade lastTrade
  }
}
```

***

## `walletPerformance`

Time-series stats for one wallet across a date range — useful for charts.

### Arguments

| Name         | Type     | Required | Description                                                                            |
| ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
| `address`    | `String` | yes      | Wallet address (≥ 32 chars).                                                           |
| `from`       | `String` | yes      | Start time in **seconds** since epoch, as a string.                                    |
| `to`         | `String` | yes      | End time in **seconds** since epoch, as a string. Must be greater than `from`.         |
| `resolution` | `String` | no       | Bucket size. Default `"1h"`. Supports `"1m"`, `"5m"`, `"15m"`, `"1h"`, `"4h"`, `"1d"`. |

### Return type

```graphql theme={null}
type WalletPerformancePoint {
  timestamp: String!
  trades: Int!
  buys: Int!
  sells: Int!
  volumeSol: Float!
  realizedPnlSol: Float!
  uniqueTokens: Int!
}
```

Returned oldest-first.

### Example

```graphql theme={null}
query {
  walletPerformance(
    address: "3ixtZXbbJjNEq89GbeFu8vJMGDMNSePofNEf5kecVhsA"
    from: "1740000000"
    to:   "1740086400"
    resolution: "1h"
  ) {
    timestamp trades volumeSol realizedPnlSol uniqueTokens
  }
}
```
