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

# Wallet - PnL Chart

> Retrieve the realized PnL chart of a wallet.

<Tabs>
  <Tab title="Usage Note">
    <p><strong>Realized PnL time series for one wallet.</strong></p>

    <ul>
      <li><code>position\_scope</code> supports <code>duration\_only</code> and <code>cumulative</code>.</li>
      <li><code>pnl\_method</code> supports <code>netcash</code> and <code>wac</code> so the chart can follow the same realized-PnL accounting method as your backend.</li>
      <li><code>time\_from</code> and <code>time\_to</code> must use <code>YYYY-MM-DD HH:mm:ss</code> in UTC.</li>
      <li>If omitted, the backend fills a default window bounded to at most 100 days.</li>
      <li>The time range from <code>time\_from</code> to <code>time\_to</code> must not exceed 100 days.</li>
    </ul>
  </Tab>

  <Tab title="Accessibility">
    <ul>
      <li>Lite</li>
      <li>Starter</li>
      <li>Premium</li>
      <li>Business</li>
      <li>Enterprise</li>
    </ul>
  </Tab>

  <Tab title="Chain Supported">
    <p><strong>SVM ⛓️ ✨</strong></p>
    <p><strong>EVM ⛓️ ✨</strong></p>
  </Tab>
</Tabs>

<Accordion title="Compute Unit ⚙️" icon="fa-gauge-high">
  <ul>
    <li>This endpoint consumes <code>30 CU</code> per request.</li>
  </ul>
</Accordion>

<Accordion title="Use Cases 💡" icon="fa-lightbulb">
  <ul>
    <li>Plot realized PnL over time for one wallet.</li>
    <li>Compare cumulative versus duration-only profit behavior.</li>
    <li>Support trader-performance charts and recent-versus-all-time performance analysis.</li>
  </ul>
</Accordion>

<Accordion title="How to Use 🛠️" icon="fa-book-open">
  <ul>
    <li>Set the supported PnL chain in <code>x-chain</code>.</li>
    <li>Pass the wallet address in <code>wallet</code>.</li>
    <li>Provide <code>time\_from</code> and <code>time\_to</code> in UTC when you need an explicit window.</li>
    <li>Choose <code>position\_scope</code> based on whether you want isolated interval behavior or cumulative progression.</li>
    <li>Pass <code>pnl\_method</code> explicitly when the chart must match summary and detail views exactly.</li>
  </ul>
</Accordion>

<Accordion title="Best Practices ✅" icon="fa-check-circle">
  <ul>
    <li>Use explicit windows for reporting jobs so charts are reproducible.</li>
    <li>Keep chart labels clear about whether the series is cumulative or duration-only.</li>
    <li>Pair the PnL chart with wallet summary metrics so users can reconcile line shape with total outcomes.</li>
  </ul>
</Accordion>

<Accordion title="Limitations ⚠️" icon="fa-exclamation-triangle">
  <ul>
    <li>Maximum chart range is 100 days.</li>
  </ul>
</Accordion>

<br />


## OpenAPI

````yaml openapi/data/openapi_docs.json GET /wallet/v2/pnl/chart
openapi: 3.1.0
info:
  version: 1.1.0
  title: Birdeye Data API
  description: >-
    Birdeye Data API is a full-spectrum blockchain and DEX data platform for
    teams that need production-grade crypto market intelligence across tokens,
    pairs, wallets, traders, protocols, and chains.


    From real-time prices, OHLCV, liquidity, and transaction flow to holder
    analytics, token and pair overviews, wallet portfolio and PnL, smart money,
    discovery, security, and blockchain-level utilities, Birdeye gives you a
    unified data layer for building serious crypto products at scale.


    Use it to power exchange interfaces, trading terminals, bots, market-making
    systems, quant research, alpha screeners, portfolio apps, wallet
    intelligence tools, alerting systems, analytics dashboards, and back-office
    data pipelines. Whether your users are retail traders, pro desks, analysts,
    or infrastructure teams, Birdeye helps you ship faster with broad market
    coverage and API surfaces that support both lightweight integrations and
    data-heavy workflows.


    To start, create an account at [bds.birdeye.so](https://bds.birdeye.so),
    generate an API key from the `Security` tab, and send it in the `X-API-KEY`
    header on every request.
servers:
  - url: https://public-api.birdeye.so
security:
  - apiKeyAuth: []
tags:
  - name: Price & OHLCV
  - name: Stats
  - name: Token/Market List
  - name: Transactions
  - name: Wallet, Networth & PnL
  - name: Balance & Transfer
  - name: Holder
  - name: Alltime & History
  - name: Blockchain
  - name: Account
  - name: Token
  - name: Transaction
  - name: Creation & Trending
  - name: Meme
  - name: Security
  - name: Search & Utils
  - name: Smart Money
  - name: Global Fees Paid
  - name: DEX & Protocol
  - name: Wallet Identity
paths:
  /wallet/v2/pnl/chart:
    get:
      tags:
        - Wallet, Networth & PnL
      summary: Wallet - PnL Chart
      description: Retrieve the realized PnL chart of a wallet.
      operationId: get-wallet-v2-pnl-chart
      parameters:
        - $ref: '#/components/parameters/xPNLChainParam'
        - $ref: '#/components/parameters/walletAddressParam'
        - $ref: '#/components/parameters/optionalPositionScopeParam'
        - $ref: '#/components/parameters/pnlChartOptionalTimeFromParam'
        - $ref: '#/components/parameters/pnlChartOptionalTimeToParam'
        - $ref: '#/components/parameters/optionalPnlMethod'
      responses:
        '200':
          $ref: '#/components/responses/WalletPnlChartResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    xPNLChainParam:
      name: x-chain
      description: The chain support PNL data.
      in: header
      required: false
      schema:
        type: string
        enum:
          - solana
          - ethereum
          - arbitrum
          - avalanche
          - bsc
          - optimism
          - polygon
          - base
          - zksync
          - monad
          - hyperevm
          - mantle
          - megaeth
          - robinhood
        default: solana
    walletAddressParam:
      name: wallet
      description: The wallet of the account.
      in: query
      required: true
      schema:
        type: string
      examples:
        solana:
          value: eJpBLoF3bgXpzjxqJRAvMchjEo4EqdAmiQh3ASmEtZT
    optionalPositionScopeParam:
      name: position_scope
      description: >-
        Calculation mode for PnL. duration_only calculates PnL only for each
        selected time bucket. cumulative calculates realized_pnl cumulatively
        from the start time, while unrealized_pnl is based on the all-time open
        position. Defaults to duration_only.
      in: query
      required: false
      schema:
        type: string
        enum:
          - duration_only
          - cumulative
        default: duration_only
    pnlChartOptionalTimeFromParam:
      name: time_from
      description: >-
        Specify the start time in `YYYY-MM-DD HH:mm:ss` format. Defaults to 100
        days before the current time. The time range between time_from and
        time_to must not exceed 100 days.
      in: query
      required: false
      schema:
        type: string
      example: '2025-01-01 00:00:00'
    pnlChartOptionalTimeToParam:
      name: time_to
      description: >-
        Specify the start time in `YYYY-MM-DD HH:mm:ss` format. Defaults to the
        current time.
      in: query
      required: false
      schema:
        type: string
      example: '2025-03-01 00:00:00'
    optionalPnlMethod:
      name: pnl_method
      description: >-
        PNL calculation method. `wac` (Weighted Average Cost): calculates PNL
        for each sell against the average cost of the position held at the time
        of the sell. Buys only re-average the cost of the remaining inventory,
        and previously realized sell PNL is not affected by later trades.
        `netcash` (Net Cash): calculates PNL across the full trade history using
        the spread between cumulative average sell price and cumulative average
        buy price. The buy average includes all buys and is not reduced by
        sells, so later buys can change the reported PNL.
      in: query
      required: false
      schema:
        type: string
        enum:
          - wac
          - net_cash
        default: net_cash
      example: net_cash
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Bad request
    '401':
      description: Unauthorized. API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Unauthorized
    '403':
      description: Forbidden. Request is blacklisted or not whitelisted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Access Denied
    '429':
      description: Too Many Requests. Rate limit reached
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Too many requests
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Internal Server Error
    WalletPnlChartResponse:
      description: JSON object containing a wallet pnl chart
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WalletPnlChartResponseSchema'
          examples:
            Solana:
              value:
                data:
                  - timestamp: '2026-05-30T23:59:59Z'
                    realized_pnl: 0
                    total_volume_usd: 64.447324224148
                    total_token_traded: 13
                    total_tx_count: 13
                  - timestamp: '2026-05-31T23:59:59Z'
                    realized_pnl: 0.014336242978757942
                    total_volume_usd: 159.60189124804634
                    total_token_traded: 18
                    total_tx_count: 48
                  - timestamp: '2026-06-01T23:59:59Z'
                    realized_pnl: 0.006014134550233186
                    total_volume_usd: 220.32103859032927
                    total_token_traded: 22
                    total_tx_count: 75
  schemas:
    WalletPnlChartResponseSchema:
      type: object
      required:
        - data
      properties:
        success:
          type: boolean
          description: Whether the request succeeded.
        data:
          type: array
          description: Time-series points for realized PnL and trading activity.
          items:
            type: object
            properties:
              timestamp:
                type: string
                description: End timestamp for the aggregation bucket.
              realized_pnl:
                type: number
                description: Realized PnL accumulated in the bucket.
              total_volume_usd:
                type: number
                description: Total USD trading volume in the bucket.
              total_token_traded:
                type: number
                description: Number of unique tokens traded in the bucket.
              total_tx_count:
                type: number
                description: Number of transactions in the bucket.
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````