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

# Get Wallet PnL Calendar

> Returns daily wallet snapshots with cumulative PnL plus per-day realized PnL, volume, buy and sell counts, and averages. Use `period` for quick windows or `start` and `end` for exact ranges.

## SDK Example

<CodeGroup>
  ```typescript SDK
  import { Client } from '@solana-tracker/data-api';

  const client = new Client({ apiKey: 'YOUR_API_KEY' });

  const data = await client.getPnlV2WalletHistory('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', { period: '30d' });

  ```
</CodeGroup>


## OpenAPI

````yaml /data-api/pnl-v2/openapi.json get /v2/pnl/wallets/{wallet}/history
openapi: 3.1.0
info:
  title: SolanaTracker PnL V2 API
  description: >-
    Profit-and-loss tracking for Solana wallets. Provides wallet PnL summaries,
    token-level positions, leaderboards, KOL rankings, risk analysis, and
    historical performance data. All monetary values are in USD. All timestamps
    are Unix milliseconds unless noted otherwise.
  version: 2.0.0
servers:
  - url: https://data.solanatracker.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Leaderboard
    description: Top traders, whales, and KOL rankings
  - name: Token
    description: Per-token trader and holder data
  - name: Wallet
    description: Wallet-level PnL, positions, history, and analysis
  - name: Batch
    description: Bulk wallet summaries and position lookups
paths:
  /v2/pnl/wallets/{wallet}/history:
    get:
      tags:
        - Wallet
      summary: Get Wallet PnL Calendar
      description: >-
        Returns daily wallet snapshots with cumulative PnL plus per-day realized
        PnL, volume, buy and sell counts, and averages. Use `period` for quick
        windows or `start` and `end` for exact ranges.
      operationId: getWalletHistory
      parameters:
        - $ref: '#/components/parameters/walletPath'
        - name: period
          in: query
          description: Quick date range shorthand. Ignored if `start`/`end` are set.
          schema:
            type: string
            enum:
              - 1d
              - 7d
              - 14d
              - 30d
              - 90d
              - all
        - name: start
          in: query
          description: Start date (YYYY-MM-DD). Defaults to 30 days ago.
          schema:
            type: string
            format: date
        - name: end
          in: query
          description: End date (YYYY-MM-DD). Defaults to today.
          schema:
            type: string
            format: date
        - name: limit
          in: query
          description: >-
            Maximum number of days to return. If more days exist, returns the
            most recent ones.
          schema:
            type: integer
            default: 365
            maximum: 1000
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  wallet:
                    type: string
                  identity:
                    $ref: '#/components/schemas/Identity'
                  days:
                    type: array
                    items:
                      $ref: '#/components/schemas/Snapshot'
                  summary:
                    type: object
                    properties:
                      days:
                        type: object
                        properties:
                          trading:
                            type: integer
                            description: Days with any trading activity.
                          positive:
                            type: integer
                            description: Days with positive realized PnL.
                          negative:
                            type: integer
                            description: Days with negative realized PnL.
                          breakEven:
                            type: integer
                      totals:
                        type: object
                        properties:
                          realizedPnl:
                            type:
                              - number
                              - 'null'
                          volume:
                            type:
                              - number
                              - 'null'
                      winRate:
                        type:
                          - number
                          - 'null'
                        description: Percentage of trading days that were profitable.
                      totalDays:
                        type: integer
                        description: >-
                          Total days in the full date range (before limit is
                          applied).
                      deltas:
                        type:
                          - object
                          - 'null'
                        description: Change between first and last snapshot in the range.
                        properties:
                          realized:
                            type:
                              - number
                              - 'null'
                          total:
                            type:
                              - number
                              - 'null'
              example:
                wallet: CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                identity:
                  name: Cented
                  twitter: '@Cented7'
                  avatar: >-
                    https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                  platforms:
                    - axiom
                    - bloom
                  type: kol
                  tags:
                    - kol
                    - axiom
                    - bloom
                days:
                  - date: '2026-04-17'
                    cumulative:
                      pnl:
                        realized: 10634698.24
                        unrealized: -1834.93
                        total: 10632863.31
                      cost: 49449916.77
                      proceeds: 60084615.01
                      openPositions:
                        cost: 4125.18
                        value: 3802.94
                      counts:
                        buys: 193365
                        sells: 137486
                        tokensTraded: 78007
                    activity:
                      pnl:
                        realized: 19119.76
                      counts:
                        buys: 680
                        sells: 274
                      volume:
                        costUsd: 85101.2
                        total: 188145.69
                      averages:
                        buy: 125.15
                        sell: 376.07
                        realizedPnl: 69.78
                        holdTimeSecs: 0.06884671532846717
                  - date: '2026-04-18'
                    cumulative:
                      pnl:
                        realized: 10649442.15
                        unrealized: -1762.31
                        total: 10647679.83
                      cost: 49503916.09
                      proceeds: 60153358.24
                      openPositions:
                        cost: 4172.59
                        value: 4252.19
                      counts:
                        buys: 193834
                        sells: 137680
                        tokensTraded: 78125
                    activity:
                      pnl:
                        realized: 14625.1
                      counts:
                        buys: 470
                        sells: 194
                      volume:
                        costUsd: 53226.11
                        total: 121969.34
                      averages:
                        buy: 113.25
                        sell: 354.35
                        realizedPnl: 75.39
                        holdTimeSecs: 0.008350515463917524
                summary:
                  days:
                    trading: 3
                    positive: 3
                    negative: 0
                    breakEven: 0
                  totals:
                    realizedPnl: 40077.97
                    volume: 378627.53
                  winRate: 100
                  totalDays: 8
                  deltas:
                    realized: 21077.02
                    total: 21628.76
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getPnlV2WalletHistory('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            { period: '30d' });
      x-code-samples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getPnlV2WalletHistory('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            { period: '30d' });
components:
  parameters:
    walletPath:
      name: wallet
      in: path
      required: true
      description: Solana wallet address (base58, 32-44 characters).
      schema:
        type: string
        pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
  schemas:
    Identity:
      type: object
      description: >-
        Unified wallet identity. Only fields with known values are returned; a
        wallet can carry multiple tags at once.
      properties:
        name:
          type:
            - string
            - 'null'
          description: Display name, if known.
        twitter:
          type:
            - string
            - 'null'
          description: Twitter/X handle, if known.
        avatar:
          type:
            - string
            - 'null'
          format: uri
          description: Avatar image URL.
        type:
          type:
            - string
            - 'null'
          description: >-
            Primary label for single-badge UIs, such as `kol`, `developer`,
            `pool`, `bot`, `hacker`, `spam_dusting`, `exchange`, or a platform
            tag.
        tags:
          type: array
          items:
            type: string
          description: >-
            All resolved labels for the wallet, including KOL, platform, pool,
            developer, bot, arbitrage, hacker, spam-dusting, or exchange tags.
        platforms:
          type: array
          items:
            type: string
          description: >-
            Normalized trading frontend tags such as `axiom`, `bloom`, or
            `photon`. Query filters also accept `axiom-flash`, which is
            normalized to `axiom` in identity responses.
        bot:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            avatar:
              type:
                - string
                - 'null'
              format: uri
        pool:
          type: object
          properties:
            program:
              type:
                - string
                - 'null'
            poolAddress:
              type:
                - string
                - 'null'
        developer:
          type: object
          properties:
            token:
              type:
                - string
                - 'null'
            via:
              type: array
              items:
                type: string
            pools:
              type: array
              items:
                type: string
            creationTx:
              type:
                - string
                - 'null'
            createdAt:
              type:
                - integer
                - 'null'
              description: Unix timestamp in seconds.
        hacker:
          type: object
          description: Curated exploit/scam wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
        spamDusting:
          type: object
          description: Curated spam-dusting wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
        exchange:
          type: object
          description: Known centralized exchange hot wallet label, when known.
          properties:
            name:
              type:
                - string
                - 'null'
    Snapshot:
      type: object
      description: >-
        A daily wallet snapshot showing cumulative totals and that day's trading
        activity.
      properties:
        date:
          type: string
          format: date
          description: Snapshot date (YYYY-MM-DD).
        cumulative:
          type: object
          description: Running totals up to and including this date.
          properties:
            pnl:
              $ref: '#/components/schemas/PnlBlock'
            cost:
              type:
                - number
                - 'null'
            proceeds:
              type:
                - number
                - 'null'
            openPositions:
              type: object
              properties:
                cost:
                  type:
                    - number
                    - 'null'
                value:
                  type:
                    - number
                    - 'null'
            counts:
              type: object
              properties:
                buys:
                  type: integer
                sells:
                  type: integer
                tokensTraded:
                  type: integer
        activity:
          type: object
          description: Trading activity for this specific day only.
          properties:
            pnl:
              type: object
              properties:
                realized:
                  type:
                    - number
                    - 'null'
            counts:
              type: object
              properties:
                buys:
                  type: integer
                sells:
                  type: integer
            volume:
              type: object
              properties:
                costUsd:
                  type:
                    - number
                    - 'null'
                  description: USD spent on buys today.
                total:
                  type:
                    - number
                    - 'null'
                  description: Total volume (buys + sells) today.
            averages:
              type: object
              properties:
                buy:
                  type:
                    - number
                    - 'null'
                sell:
                  type:
                    - number
                    - 'null'
                realizedPnl:
                  type:
                    - number
                    - 'null'
                  description: Average realized PnL per sell today.
                holdTimeSecs:
                  type:
                    - integer
                    - 'null'
                  description: Average hold time in seconds for tokens sold today.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
    PnlBlock:
      type: object
      description: Realized, unrealized, and total profit/loss in USD.
      properties:
        realized:
          type:
            - number
            - 'null'
          description: Profit/loss from closed trades (tokens fully or partially sold).
        realizedRaw:
          type:
            - number
            - 'null'
          description: >-
            Unfiltered realized PnL before `pnlMode` adjustments. Present on
            position rows and leaderboard period stats when available.
        unrealized:
          type:
            - number
            - 'null'
          description: >-
            Paper profit/loss on tokens still held, based on current market
            price.
        total:
          type:
            - number
            - 'null'
          description: Sum of realized + unrealized PnL.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````