> ## 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, like hyperdash.com's profile chart, computed by Hyperdash from its own data: the hourly account-value snapshots (as GET /v1/accounts/{address}/account-value) and the wallet's USDC ledger flows (deposits, withdrawals, transfers). Per bucket: the account value at its last snapshot, the net USDC flows assigned to its snapshots, and pnl = account value − the value at the window start − net USDC flows since (each ledger update counts at the first snapshot at or after it; the value at the start is the last snapshot before the window, 0 if none). Account value change minus flows only: no realized / unrealized split; transfers of other tokens show as PnL. Between two daily closes, pnl changes by the sum of GET /v1/accounts/{address}/pnl-calendar's daily PnL over those days. `window` sets the bucket and default range: day (15 min buckets, last 24 h; with start_time ≤ 7 days), week (1 h, last 7 days; ≤ 30 days), month (4 h, last 30 days; ≤ 90 days), alltime (1 day, from 2025-08-25, the first snapshots, through the whole history, buckets widened to whole multi-day buckets past 1,000 days; with start_time ≤ 365 days). Buckets without a snapshot are absent. One page.

Pricing: flat; ×1 to 7d, ×3 to 30d, ×4 to 90d, ×10 to 365d, ×11 for all history. Scope: `accounts:read`.



## 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. 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 DEXs
  - name: Leaderboards
  - name: Lending
  - name: Liquidations
  - name: Markets
  - name: Network
  - name: Outcomes
  - name: Positions
  - name: Snapshots
  - name: Spot
  - name: Staking
  - name: Traders
paths:
  /v1/accounts/{address}/pnl-chart:
    get:
      tags:
        - Accounts
      summary: PnL chart
      description: >-
        A wallet's cumulative PnL over a window, like hyperdash.com's profile
        chart, computed by Hyperdash from its own data: the hourly account-value
        snapshots (as GET /v1/accounts/{address}/account-value) and the wallet's
        USDC ledger flows (deposits, withdrawals, transfers). Per bucket: the
        account value at its last snapshot, the net USDC flows assigned to its
        snapshots, and pnl = account value − the value at the window start − net
        USDC flows since (each ledger update counts at the first snapshot at or
        after it; the value at the start is the last snapshot before the window,
        0 if none). Account value change minus flows only: no realized /
        unrealized split; transfers of other tokens show as PnL. Between two
        daily closes, pnl changes by the sum of GET
        /v1/accounts/{address}/pnl-calendar's daily PnL over those days.
        `window` sets the bucket and default range: day (15 min buckets, last 24
        h; with start_time ≤ 7 days), week (1 h, last 7 days; ≤ 30 days), month
        (4 h, last 30 days; ≤ 90 days), alltime (1 day, from 2025-08-25, the
        first snapshots, through the whole history, buckets widened to whole
        multi-day buckets past 1,000 days; with start_time ≤ 365 days). Buckets
        without a snapshot are absent. One page.


        Pricing: flat; ×1 to 7d, ×3 to 30d, ×4 to 90d, ×10 to 365d, ×11 for all
        history. Scope: `accounts:read`.
      operationId: getAccountPnlChart
      parameters:
        - name: address
          in: path
          required: true
          description: Wallet, 0x + 40 hex.
          schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{40}$
        - 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, epoch ms. Default: end_time − the window (alltime:
            2025-08-25).
          schema:
            type: integer
        - name: end_time
          in: query
          required: false
          description: 'End, epoch ms (inclusive). Default: now.'
          schema:
            type: integer
        - name: X-Max-Credits
          in: header
          required: false
          description: Refuse (free) if the request could cost more.
          schema:
            type: integer
        - name: X-Credit-Price-Version
          in: header
          required: false
          description: Expected price version; 409 price_changed if it differs.
          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, epoch ms
                        account_value:
                          type: string
                          description: >-
                            Account value at the bucket's last snapshot (USD)
                            (decimal string; may carry extra trailing zeros)
                        net_flows:
                          type: string
                          description: >-
                            Net USDC ledger flows assigned to the bucket (USD;
                            in > 0) (decimal string; may carry extra trailing
                            zeros)
                        pnl:
                          type: string
                          description: >-
                            Cumulative PnL at the bucket's last snapshot since
                            the window start (USD) (decimal string; may carry
                            extra trailing zeros)
                  has_more:
                    type: boolean
                  next_cursor:
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
        '400':
          description: Invalid parameter
          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
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Backend at capacity (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
      x-codeSamples:
        - lang: curl
          source: >-
            curl -H 'Authorization: Bearer $HD_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: hdk_sk_live_v1_… or hdk_sk_test_v1_…

````

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