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

# Daily portfolio value chart

> Returns a daily portfolio-value series for the wallet. The chart is assembled on-demand with a cron-free model:

1. **Closed days** are read from the store and returned as-is — they are immutable once written.
2. **Gaps** (days between the last stored point and yesterday) are filled lazily: the FIFO engine replays the wallet's swaps to reconstruct end-of-day holdings, prices them against `ohlcv_1d` closes, and persists the result before returning.
3. **Today** is always computed live and returned as `today` with `provisional: true` — never persisted.

`value_usd` uses the **current** SOL/USD rate from the Pyth oracle for all points, including historical ones. Apply your own historical SOL/USD to `value_sol` if you need historically accurate USD values.

See [Wallet portfolio](/concepts/wallet-portfolio#cron-free-chart-freshness) for the full freshness model.



## OpenAPI

````yaml /api-reference/openapi.json get /wallets/{w}/chart
openapi: 3.1.0
info:
  title: Dexploit API
  version: 1.0.0
  description: Real-time and historical Solana DEX swap and OHLCV data.
servers:
  - url: https://api.dexploit.dev
    description: Production
security:
  - ApiKeyHeader: []
  - BearerAuth: []
  - ApiKeyQuery: []
paths:
  /wallets/{w}/chart:
    get:
      tags:
        - Wallet portfolio
      summary: Daily portfolio value chart
      description: >-
        Returns a daily portfolio-value series for the wallet. The chart is
        assembled on-demand with a cron-free model:


        1. **Closed days** are read from the store and returned as-is — they are
        immutable once written.

        2. **Gaps** (days between the last stored point and yesterday) are
        filled lazily: the FIFO engine replays the wallet's swaps to reconstruct
        end-of-day holdings, prices them against `ohlcv_1d` closes, and persists
        the result before returning.

        3. **Today** is always computed live and returned as `today` with
        `provisional: true` — never persisted.


        `value_usd` uses the **current** SOL/USD rate from the Pyth oracle for
        all points, including historical ones. Apply your own historical SOL/USD
        to `value_sol` if you need historically accurate USD values.


        See [Wallet
        portfolio](/concepts/wallet-portfolio#cron-free-chart-freshness) for the
        full freshness model.
      operationId: getWalletChart
      parameters:
        - name: w
          in: path
          required: true
          schema:
            type: string
          description: Wallet address (base58, 32–44 characters).
        - name: window
          in: query
          required: false
          schema:
            type: string
            enum:
              - 30d
              - 90d
              - 1y
              - all
            default: 90d
          description: >-
            How far back to go. `all` returns every day since the wallet's first
            indexed trade.
      responses:
        '200':
          description: Portfolio chart series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioChartResponse'
        '400':
          description: Invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    PortfolioChartResponse:
      type: object
      description: >-
        Daily portfolio value series for a wallet. Closed days are immutable and
        served from the store; today is always computed live.
      required:
        - wallet
        - window
        - series
        - today
        - computed_at
      properties:
        wallet:
          type: string
        window:
          type: string
          example: 90d
        series:
          type: array
          description: Closed days only. Each point is immutable once written.
          items:
            $ref: '#/components/schemas/PortfolioChartPoint'
        today:
          allOf:
            - $ref: '#/components/schemas/PortfolioChartPoint'
          description: >-
            Today's portfolio value, always computed live. `provisional: true`
            is always set.
        computed_at:
          type: integer
          format: int64
          description: Unix epoch milliseconds when this response was assembled.
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_PARAM
            message:
              type: string
              example: >-
                use pair_address; see /api/v1/pairs?token_address=X to discover
                pools
    PortfolioChartPoint:
      type: object
      description: One day in a wallet portfolio chart series.
      required:
        - day
        - value_sol
        - value_usd
      properties:
        day:
          type: string
          format: date
          description: Calendar date in `YYYY-MM-DD` format (UTC).
          example: '2026-05-01'
        value_sol:
          type: number
          description: >-
            Portfolio value in SOL on this day, computed from historical
            `ohlcv_1d` closes.
        value_usd:
          type: number
          description: >-
            Portfolio value in USD. Uses the **current** SOL/USD rate for all
            historical points — Dexploit does not store a daily SOL/USD history.
            Apply your own historical SOL/USD to `value_sol` for accurate
            historical USD.
        provisional:
          type: boolean
          description: >-
            Present and `true` only on `today` — the current day is computed
            live and has not been finalized.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Preferred for swaps-api endpoints (`/swaps/*`, `/stats/*`, `/trending`,
        `/pool-events`).
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Required by the OHLCV endpoints (`/api/v1/*`) and accepted by every
        other endpoint. Send `Authorization: Bearer ohlcv_live_sk_<your_key>`.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        Browser-friendly alternative to the Bearer header — accepted by every
        endpoint and required for WebSocket from the browser.

````