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

# PnL chart

> A wallet's cumulative PnL over a window, computed by Hyperdash from its own data: the hourly account-value snapshots and the capital moved in or out of that value.



## OpenAPI

````yaml /data-api/openapi.json get /v1/accounts/{address}/pnl-chart
openapi: 3.1.0
info:
  title: Hyperdash Data API
  version: v1
  description: >-
    Hyperliquid data from Hyperdash's own nodes and stored datasets; requests
    never call Hyperliquid's public API. Every response reports the credits it
    cost.
servers:
  - url: https://data.hyperdash.com
security: []
tags:
  - name: Accounts
  - name: Async jobs
  - name: Builders
  - name: Cohorts
  - name: HIP-3 dexes
  - name: Leaderboards
  - name: Lending
  - name: Liquidations
  - name: Markets
  - name: 'Markets: analytics'
  - name: 'Markets: funding'
  - name: 'Markets: liquidation and stop levels'
  - name: 'Markets: open interest and positioning'
  - name: 'Markets: order book'
  - name: 'Markets: prices and candles'
  - name: 'Markets: queue priority'
  - name: 'Markets: trades and flow'
  - name: 'Markets: TWAPs'
  - name: Network
  - name: Outcomes
  - name: Positions
  - name: Referrals
  - name: Snapshots
  - name: Spot
  - name: Staking
  - name: Traders
  - name: Vaults
paths:
  /v1/accounts/{address}/pnl-chart:
    get:
      tags:
        - Accounts
      summary: PnL chart
      description: >-
        A wallet's cumulative PnL over a window, computed by Hyperdash from its
        own data: the hourly account-value snapshots and the capital moved in or
        out of that value.


        **How it works**

        - The snapshots are the same as `GET
        /v1/accounts/{address}/account-value`.

        - Capital moved follows the definition of `GET
        /v1/accounts/{address}/pnl-calendar`. From 2026-09-23 it covers
        deposits, withdrawals, transfers with other wallets on any side at their
        USD value, vaults, borrow and lend, and HYPE staking transfers. Before
        that date it is the perp-cash USDC moves.

        - Each bucket has the account value at its last snapshot, the net flows
        assigned to its snapshots, and `pnl`.

        - `pnl` is account value minus the value at the window start minus net
        flows since then.

        - Each ledger update counts at the first snapshot at or after it.

        - The value at the start is the last snapshot before the window, or 0 if
        there is none.

        - This is account value change minus flows only, with no realized and
        unrealized split. For realized PnL alone, use `GET
        /v1/accounts/{address}/realized-pnl`.

        - For a unified account, `pnl` is the whole collateral pool's PnL, as in
        the calendar, and the calendar's known limits apply.

        - A one-time step from a change in how Hyperdash computes the stored
        value is in `net_flows`, not in `pnl`. In 2026-11 that change added the
        spot wallets of flat classic accounts. The calendar's exceptions apply:
        wallets active around the switch, and portfolio-margin accounts.

        - Between two daily closes, `pnl` changes by the sum of the daily PnL
        from `GET /v1/accounts/{address}/pnl-calendar` over those days.


        **Windows**

        - `window` sets the bucket and the default range. The limits below apply
        when you pass `start_time`.

        - `day`: 15-minute buckets over the last 24 hours. With `start_time`,
        the range is at most 7 days.

        - `week`: 1-hour buckets over the last 7 days. With `start_time`, the
        range is at most 30 days.

        - `month`: 4-hour buckets over the last 30 days. With `start_time`, the
        range is at most 90 days.

        - `alltime`: 1 day buckets from 2025-08-25, the first snapshots, through
        the whole history. Past 1,000 days, buckets are widened to whole
        multi-day buckets. With `start_time`, the range is at most 365 days.


        **Notes**

        - The series is like the profile chart on hyperdash.com.

        - Buckets without a snapshot are absent.

        - The response is one page.


        **Credits:** 15 per request. Range multiplier: ×1 to 7 days, ×3 to 30
        days, ×4 to 90 days, ×10 to 365 days, ×11 for all history.


        **Scope:** `accounts:read`
      operationId: getAccountPnlChart
      parameters:
        - name: address
          in: path
          required: true
          description: 'Wallet address: `0x` followed by 40 hex characters.'
          schema:
            type: string
        - name: window
          in: query
          required: false
          description: Bucket size and default range.
          schema:
            type: string
            default: day
            enum:
              - day
              - week
              - month
              - alltime
        - name: start_time
          in: query
          required: false
          description: >-
            Start time in epoch milliseconds. Defaults to `end_time` minus the
            window. For `alltime` it is 2025-08-25.
          schema:
            type: integer
        - name: end_time
          in: query
          required: false
          description: End time in epoch milliseconds, inclusive. Defaults to now.
          schema:
            type: integer
      responses:
        '200':
          description: OK
          headers:
            X-Credits-Charged:
              schema:
                type: integer
            X-Credit-Price-Version:
              schema:
                type: integer
            X-Request-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        t:
                          type: integer
                          description: Bucket start, in epoch milliseconds.
                        account_value:
                          type: string
                          description: >-
                            Account value at the bucket's last snapshot, in USD.
                            Decimal string.
                        net_flows:
                          type: string
                          description: >-
                            Net capital moved in or out assigned to the bucket,
                            in USD, including a one-time revaluation step of the
                            stored value. Inflows are above 0 and outflows below
                            0. Decimal string.
                        pnl:
                          type: string
                          description: >-
                            Cumulative PnL at the bucket's last snapshot since
                            the window start, in USD. Decimal string.
                    description: Result rows.
                  has_more:
                    type: boolean
                    description: '`true` when another page follows.'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor for the next page, passed as `cursor`. `null` on
                      the last page.
                  meta:
                    type: object
                    description: >-
                      Response metadata. Its keys depend on the endpoint and are
                      described above.
        '400':
          description: 'Invalid parameter (also: a request body that is not valid JSON)'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Invalid, expired or revoked key
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Scope, plan, history or credit limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Price version changed, or a cursor's snapshot expired
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: >-
            Rate limited (Retry-After; free): request rate, concurrent requests
            (a request counts one slot per 1,000 rows it can return), or this
            server busy with your workspace's requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Upstream data source failed (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Backend at capacity or temporarily unavailable (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '504':
          description: Upstream data source timed out (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
      x-codeSamples:
        - lang: curl
          source: >-
            curl -H "Authorization: Bearer $HYPERDASH_API_KEY"
            'https://data.hyperdash.com/v1/accounts/0x…/pnl-chart?window=week'
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        hint:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your API key, sent as `Bearer hdk_sk_live_v1_…`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.