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

# Portfolio-PnL leaderboard

> Traders ranked by unrealized PnL, unrealized PnL %, total PnL, realized PnL % or total PnL % (Hyperliquid portfolio PnL over a window, which already includes open positions), with profile, account value and top assets. Top 500 per sort and window. totalPnl = the window's portfolio PnL; realizedPnlPct and totalPnlPct are the same ratio (portfolio PnL ÷ current account value) and realizedPnlPct is deprecated (not realized-only). For hyperdash.com's leaderboard (realized / unrealized split, ROI ÷ capital: equity at the window start + peak net inflow) use GET /v1/leaderboards/pnl with sort=total, realized, roi or realized_roi.

Pricing: base + per row. Scope: `analytics:read`.



## OpenAPI

````yaml /data-api/openapi.json get /v1/leaderboards/portfolio
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/leaderboards/portfolio:
    get:
      tags:
        - Leaderboards
      summary: Portfolio-PnL leaderboard
      description: >-
        Traders ranked by unrealized PnL, unrealized PnL %, total PnL, realized
        PnL % or total PnL % (Hyperliquid portfolio PnL over a window, which
        already includes open positions), with profile, account value and top
        assets. Top 500 per sort and window. totalPnl = the window's portfolio
        PnL; realizedPnlPct and totalPnlPct are the same ratio (portfolio PnL ÷
        current account value) and realizedPnlPct is deprecated (not
        realized-only). For hyperdash.com's leaderboard (realized / unrealized
        split, ROI ÷ capital: equity at the window start + peak net inflow) use
        GET /v1/leaderboards/pnl with sort=total, realized, roi or realized_roi.


        Pricing: base + per row. Scope: `analytics:read`.
      operationId: portfolioLeaderboard
      parameters:
        - name: sort
          in: query
          required: false
          description: >-
            Ranking. realizedPnlPct is deprecated (same as totalPnlPct; see the
            description).
          schema:
            type: string
            default: unrealizedPnl
            enum:
              - unrealizedPnl
              - unrealizedPnlPct
              - totalPnl
              - realizedPnlPct
              - totalPnlPct
        - name: window
          in: query
          required: false
          description: PnL window.
          schema:
            type: string
            default: alltime
            enum:
              - day
              - week
              - month
              - alltime
        - name: limit
          in: query
          required: false
          description: Rows (≤ 100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: cursor
          in: query
          required: false
          description: Opaque cursor from next_cursor.
          schema:
            type: string
        - 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:
                        rank:
                          type: integer
                          description: Rank
                        address:
                          type: string
                          description: Wallet
                        display_name:
                          type:
                            - string
                            - 'null'
                          description: Display name
                        label:
                          type:
                            - string
                            - 'null'
                          description: Label
                        tag:
                          type:
                            - string
                            - 'null'
                          description: Tag
                        account_value:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Account value (USD) (decimal string; may carry extra
                            trailing zeros)
                        unrealized_pnl:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Unrealized PnL (USD) (decimal string; may carry
                            extra trailing zeros)
                        pnl_day:
                          type: string
                          description: >-
                            Perp PnL, 24 h (decimal string; may carry extra
                            trailing zeros)
                        pnl_week:
                          type: string
                          description: >-
                            Perp PnL, 7 d (decimal string; may carry extra
                            trailing zeros)
                        pnl_month:
                          type: string
                          description: >-
                            Perp PnL, 30 d (decimal string; may carry extra
                            trailing zeros)
                        pnl_alltime:
                          type: string
                          description: >-
                            Perp PnL, all time (decimal string; may carry extra
                            trailing zeros)
                        winrate:
                          type: string
                          description: >-
                            Win rate (decimal string; may carry extra trailing
                            zeros)
                        total_trades:
                          type: integer
                          description: Completed trades
                        total_volume:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Volume (USD) (decimal string; may carry extra
                            trailing zeros)
                        copy_score:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Copy score (decimal string; may carry extra trailing
                            zeros)
                        top_assets:
                          type: string
                          description: 'Top assets (JSON: coin, volume, pnl)'
                        last_trade_at:
                          type:
                            - integer
                            - 'null'
                          description: Last trade, epoch ms
                        verified:
                          type: boolean
                          description: Verified profile
                        sort_value:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The ranked value (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/leaderboards/portfolio?sort=totalPnl&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.