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

> 按日时间序列，用于绘制钱包盈亏、成交量与活跃度；支持用 `time_from`/`time_to` 向后翻页，并含汇总统计。

## SDK Example

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

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

  const data = await client.getPnlV2WalletChart('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', { time_from: 1700000000, time_to: 1700086400 });

  ```
</CodeGroup>


## OpenAPI

````yaml /cn/data-api/pnl-v2/openapi.json get /v2/pnl/wallets/{wallet}/chart
openapi: 3.1.0
info:
  title: SolanaTracker PnL V2 API
  description: >-
    面向 Solana 钱包的盈亏追踪：钱包级 PnL 汇总、按代币的持仓、排行榜、KOL 榜单、风险分析与历史表现。金额均为美元；除另有说明外，时间戳均为
    Unix 毫秒。
  version: 2.0.0
servers:
  - url: https://data.solanatracker.io
    description: 生产环境
security:
  - apiKey: []
tags:
  - name: Leaderboard
    description: 顶尖交易者、巨鲸与 KOL 排名
  - name: Token
    description: 按代币的交易者与持币数据
  - name: Wallet
    description: 钱包级盈亏、持仓、历史与分析
  - name: Batch
    description: 批量钱包摘要与持仓查询
paths:
  /v2/pnl/wallets/{wallet}/chart:
    get:
      tags:
        - Wallet
      summary: Get Wallet Chart
      description: 按日时间序列，用于绘制钱包盈亏、成交量与活跃度；支持用 `time_from`/`time_to` 向后翻页，并含汇总统计。
      operationId: getWalletChart
      parameters:
        - $ref: '#/components/parameters/walletPath'
        - name: time_from
          in: query
          description: 区间起点（Unix 秒）；省略时从 `time_to` 起最多向前 180 天
          schema:
            type: integer
        - name: time_to
          in: query
          description: 区间终点（Unix 秒），默认当前时刻
          schema:
            type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  wallet:
                    type: string
                  identity:
                    $ref: '#/components/schemas/Identity'
                  points:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChartPoint'
                  summary:
                    type: object
                    properties:
                      days:
                        type: object
                        properties:
                          trading:
                            type: integer
                          positive:
                            type: integer
                          negative:
                            type: integer
                          breakEven:
                            type: integer
                      totals:
                        type: object
                        properties:
                          realizedPnl:
                            type:
                              - number
                              - 'null'
                          volume:
                            type:
                              - number
                              - 'null'
                      winRate:
                        type:
                          - number
                          - 'null'
                      bestDay:
                        type:
                          - object
                          - 'null'
                        properties:
                          date:
                            type: string
                            format: date
                          realizedPnl:
                            type:
                              - number
                              - 'null'
                      worstDay:
                        type:
                          - object
                          - 'null'
                        properties:
                          date:
                            type: string
                            format: date
                          realizedPnl:
                            type:
                              - number
                              - 'null'
                      streaks:
                        type: object
                        properties:
                          positive:
                            type: integer
                          negative:
                            type: integer
                          currentPositive:
                            type: integer
                          currentNegative:
                            type: integer
                      drawdown:
                        type: object
                        properties:
                          amount:
                            type:
                              - number
                              - 'null'
                          percent:
                            type:
                              - number
                              - 'null'
                      averages:
                        type: object
                        properties:
                          dailyVolume:
                            type:
                              - number
                              - 'null'
                          dailyRealizedPnl:
                            type:
                              - number
                              - 'null'
                          holdTimeSecs:
                            type:
                              - integer
                              - 'null'
                  pagination:
                    type: object
                    properties:
                      count:
                        type: integer
                      hasMore:
                        type: boolean
                        description: True if there are older data points available.
                      nextTimeTo:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          Pass this as `time_to` to get the next (older) page of
                          chart data.
              example:
                wallet: CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                identity:
                  name: Cented
                  twitter: '@Cented7'
                  avatar: >-
                    https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                  platforms:
                    - axiom
                    - bloom
                  type: kol
                  tags:
                    - kol
                    - axiom
                    - bloom
                points:
                  - date: '2025-10-14'
                    time: 1760400000
                    pnl:
                      realized: 6816182.11
                      total: 6816182.11
                    invested: 32254563.43
                    proceeds: 38281423.93
                    activity:
                      realizedPnl: 37132.78
                      buys: 359
                      sells: 303
                      volume: 365027.19
                      avgHoldTimeSecs: 32.339436464088394
                    counts:
                      buys: 72853
                      sells: 76328
                      tokensTraded: 46329
                  - date: '2025-10-15'
                    time: 1760486400
                    pnl:
                      realized: 6856608.25
                      total: 6856608.25
                    invested: 32346009.86
                    proceeds: 38413230.91
                    activity:
                      realizedPnl: 40426.14
                      buys: 196
                      sells: 228
                      volume: 223253.42
                      avgHoldTimeSecs: 45.60831132075471
                    counts:
                      buys: 73049
                      sells: 76556
                      tokensTraded: 46434
                summary:
                  days:
                    trading: 180
                    positive: 179
                    negative: 1
                    breakEven: 0
                  totals:
                    realizedPnl: 3574393.69
                    volume: 40026214.46
                  winRate: 99.44
                  bestDay:
                    date: '2026-03-23'
                    realizedPnl: 85718.59
                  worstDay:
                    date: '2025-11-12'
                    realizedPnl: -60803.14
                  streaks:
                    positive: 150
                    negative: 1
                    currentPositive: 150
                    currentNegative: 0
                  drawdown:
                    amount: 515125.86
                    percent: 5.31
                  averages:
                    dailyVolume: 222367.86
                    dailyRealizedPnl: 19857.74
                    holdTimeSecs: 54
                pagination:
                  count: 180
                  hasMore: true
                  nextTimeTo: 1760313600
        '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.getPnlV2WalletChart('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            { time_from: 1700000000, time_to: 1700086400 });
      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.getPnlV2WalletChart('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            { time_from: 1700000000, time_to: 1700086400 });
components:
  parameters:
    walletPath:
      name: wallet
      in: path
      required: true
      description: Solana 钱包地址（Base58，约 32–44 字符）
      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'
    ChartPoint:
      type: object
      description: A single data point for the wallet PnL chart.
      properties:
        date:
          type: string
          format: date
        time:
          type: integer
          description: Unix seconds (midnight UTC of this date).
        pnl:
          type: object
          properties:
            realized:
              type:
                - number
                - 'null'
            total:
              type:
                - number
                - 'null'
        invested:
          type:
            - number
            - 'null'
        proceeds:
          type:
            - number
            - 'null'
        activity:
          type: object
          properties:
            realizedPnl:
              type:
                - number
                - 'null'
            buys:
              type: integer
            sells:
              type: integer
            volume:
              type:
                - number
                - 'null'
            avgHoldTimeSecs:
              type:
                - integer
                - 'null'
        counts:
          type: object
          properties:
            buys:
              type: integer
              description: Cumulative buy count.
            sells:
              type: integer
              description: Cumulative sell count.
            tokensTraded:
              type: integer
              description: Cumulative distinct tokens.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 用于鉴权的 API Key

````