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

> 滚动窗口内的表现：已实现盈亏、成交量、连胜/连败、回撤、最佳/最差日及逐日明细。

## SDK Example

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

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

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

  ```
</CodeGroup>


## OpenAPI

````yaml /cn/data-api/pnl-v2/openapi.json get /v2/pnl/wallets/{wallet}/performance
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}/performance:
    get:
      tags:
        - Wallet
      summary: Get Wallet Performance
      description: 滚动窗口内的表现：已实现盈亏、成交量、连胜/连败、回撤、最佳/最差日及逐日明细。
      operationId: getWalletPerformance
      parameters:
        - $ref: '#/components/parameters/walletPath'
        - name: period
          in: query
          description: 周期简写（如 `30d`），与 `days` 二选一
          schema:
            type: string
            enum:
              - 1d
              - 7d
              - 14d
              - 30d
              - 90d
              - all
        - name: days
          in: query
          description: 滚动窗口天数，默认 30，最大 365
          schema:
            type: integer
            default: 30
            maximum: 365
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  wallet:
                    type: string
                  identity:
                    $ref: '#/components/schemas/Identity'
                  window:
                    type: integer
                    description: Number of days in the window.
                  totals:
                    type: object
                    properties:
                      realizedPnl:
                        type:
                          - number
                          - 'null'
                      volume:
                        type:
                          - number
                          - 'null'
                      trades:
                        type: integer
                  bestDay:
                    type:
                      - object
                      - 'null'
                    properties:
                      date:
                        type: string
                        format: date
                      realizedPnl:
                        type:
                          - number
                          - 'null'
                      volume:
                        type:
                          - number
                          - 'null'
                      totalPnl:
                        type:
                          - number
                          - 'null'
                      trades:
                        type: integer
                  worstDay:
                    type:
                      - object
                      - 'null'
                    properties:
                      date:
                        type: string
                        format: date
                      realizedPnl:
                        type:
                          - number
                          - 'null'
                      volume:
                        type:
                          - number
                          - 'null'
                      totalPnl:
                        type:
                          - number
                          - 'null'
                      trades:
                        type: integer
                  streaks:
                    type: object
                    description: Win/loss streaks in consecutive trading days.
                    properties:
                      positive:
                        type:
                          - integer
                          - 'null'
                        description: Longest streak of profitable days.
                      negative:
                        type:
                          - integer
                          - 'null'
                        description: Longest streak of losing days.
                      currentPositive:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          Current active winning streak (0 if last day was
                          negative).
                      currentNegative:
                        type:
                          - integer
                          - 'null'
                        description: Current active losing streak.
                  drawdown:
                    type: object
                    description: Maximum drawdown from peak total PnL within the window.
                    properties:
                      amount:
                        type:
                          - number
                          - 'null'
                        description: Drawdown in USD.
                      percent:
                        type:
                          - number
                          - 'null'
                        description: Drawdown as a percentage of the peak.
                  days:
                    type: array
                    description: Day-by-day PnL and volume for the window.
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date
                        realizedPnl:
                          type:
                            - number
                            - 'null'
                        unrealizedPnl:
                          type:
                            - number
                            - 'null'
                        totalPnl:
                          type:
                            - number
                            - 'null'
                        volume:
                          type:
                            - number
                            - 'null'
                        trades:
                          type: integer
                  updatedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
              example:
                wallet: CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                identity:
                  name: Cented
                  twitter: '@Cented7'
                  avatar: >-
                    https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                  platforms:
                    - axiom
                    - bloom
                  type: kol
                  tags:
                    - kol
                    - axiom
                    - bloom
                window: 30
                totals:
                  realizedPnl: 511646.27
                  volume: 4525541.11
                  trades: 8612631
                bestDay:
                  date: '2026-03-23'
                  realizedPnl: 85718.59
                  volume: 266262.59
                  totalPnl: 10264040.54
                  trades: 308520
                worstDay:
                  date: '2026-04-10'
                  realizedPnl: 3543.36
                  volume: 30954.42
                  totalPnl: 10509957.54
                  trades: 323507
                streaks:
                  positive: 27
                  negative: 0
                  currentPositive: 27
                  currentNegative: 0
                drawdown:
                  amount: 0
                  percent: 0
                days:
                  - date: '2026-03-20'
                    realizedPnl: 21677.68
                    unrealizedPnl: 0
                    totalPnl: 10133634.03
                    volume: 252414.51
                    trades: 304888
                  - date: '2026-03-21'
                    realizedPnl: 20060.91
                    unrealizedPnl: 0
                    totalPnl: 10153694.95
                    volume: 190766.56
                    trades: 306189
                updatedAt: '2026-04-19T17:53:30.439Z'
        '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.getPnlV2WalletPerformance('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.getPnlV2WalletPerformance('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            { period: '30d' });
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'
    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

````