> ## 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 leaderboard row

> The wallet's own row on the PnL leaderboard: rank for the chosen sort, net PnL with its realized and unrealized split, capital and ROI over the window.



## OpenAPI

````yaml /data-api/openapi.json get /v1/accounts/{address}/leaderboard
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}/leaderboard:
    get:
      tags:
        - Accounts
      summary: PnL leaderboard row
      description: >-
        The wallet's own row on the PnL leaderboard: rank for the chosen sort,
        net PnL with its realized and unrealized split, capital and ROI over the
        window.


        **Notes**

        - The leaderboard is the PnL leaderboard on hyperdash.com, `GET
        /v1/leaderboards/pnl`, or the per-market leaderboard when `coin` is set.

        - These are the numbers of the profile Performance card on
        hyperdash.com.

        - This is portfolio PnL: partial closes and open positions count, unlike
        the completed-trade statistics routes.

        - There is no row when the wallet is not ranked on that leaderboard and
        sort.

        - Results are cached for up to 1 minute.


        **Credits:** 150 per request.


        **Scope:** `analytics:read`
      operationId: getWalletLeaderboard
      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: Window.
          schema:
            type: string
            default: alltime
            enum:
              - alltime
              - 24h
              - 7d
              - 30d
              - ytd
        - name: category
          in: query
          required: false
          description: >-
            Asset category for the all-markets leaderboard. Leave it out when
            using `coin`.
          schema:
            type: string
            default: all
            enum:
              - all
              - crypto
              - majors
              - memes
              - alts
              - equities
              - indices
              - commodities
              - fx
        - name: sort
          in: query
          required: false
          description: >-
            Ranked metric: `total` for net PnL, `realized`, `unrealized`, or
            their ROI. ROI is the PnL divided by capital, for wallets with
            capital of at least 1,000 USD. Wallets without that value are not
            ranked.
          schema:
            type: string
            default: total
            enum:
              - total
              - realized
              - unrealized
              - roi
              - realized_roi
              - unrealized_roi
        - name: coin
          in: query
          required: false
          description: >-
            One market's leaderboard instead of a category, for example `BTC` or
            `xyz:GOLD`. Case-sensitive.
          schema:
            type: string
      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 on the leaderboard for the sort. `1` is the
                            best.
                        net_pnl:
                          type: string
                          description: Net PnL over the window, in USD. Decimal string.
                        realized_pnl:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Realized PnL over the window, in USD, which is
                            closed PnL minus fees plus funding, partial closes
                            included. Decimal string.
                        unrealized_pnl:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Change in open-position unrealized PnL over the
                            window, in USD. For all time, the open unrealized
                            PnL now. Decimal string.
                        capital:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Capital, in USD, which is equity at the window start
                            plus peak net external inflow. Decimal string.
                        roi:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Net PnL divided by capital, as a ratio. `0.417`
                            means 41.7%. Decimal string.
                        realized_roi:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Realized PnL divided by capital, as a ratio. Decimal
                            string.
                        unrealized_roi:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Unrealized PnL divided by capital, as a ratio.
                            Decimal string.
                        display_name:
                          type:
                            - string
                            - 'null'
                          description: Display name.
                        tag:
                          type:
                            - string
                            - 'null'
                          description: Trader tag.
                        gross_pnl:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Gross PnL before fees and funding, in USD. Decimal
                            string.
                        funding_pnl:
                          type:
                            - string
                            - 'null'
                          description: Funding PnL. Decimal string.
                        total_fees:
                          type:
                            - string
                            - 'null'
                          description: Fees. Decimal string.
                        volume:
                          type:
                            - string
                            - 'null'
                          description: Volume, in USD. Decimal string.
                        trades:
                          type:
                            - integer
                            - 'null'
                          description: Completed trades.
                        winning_trades:
                          type:
                            - integer
                            - 'null'
                          description: Winning trades.
                        losing_trades:
                          type:
                            - integer
                            - 'null'
                          description: Losing trades.
                        account_value:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Account value on the leaderboard, from the hourly
                            snapshot, in USD. Decimal string.
                        last_trade_at:
                          type:
                            - integer
                            - 'null'
                          description: Last trade, in epoch milliseconds.
                        label:
                          type:
                            - string
                            - 'null'
                          description: Hyperdash label.
                        avatar:
                          type:
                            - string
                            - 'null'
                          description: Avatar image URL.
                        twitter:
                          type:
                            - string
                            - 'null'
                          description: X (Twitter) profile URL.
                        verified:
                          type:
                            - boolean
                            - 'null'
                          description: Verified profile.
                        copy_score:
                          type:
                            - string
                            - 'null'
                          description: Copy score, from 0 to 100. Decimal string.
                        mark_quality:
                          type:
                            - integer
                            - 'null'
                          description: >-
                            Quality of the mark behind the unrealized part. `1`
                            means a live mark of every open position and `0`
                            means some fell back.
                        window_start:
                          type:
                            - integer
                            - 'null'
                          description: >-
                            Leaderboard window start, in epoch milliseconds.
                            `null` for all time.
                        as_of:
                          type:
                            - integer
                            - 'null'
                          description: >-
                            When the leaderboard was computed, in epoch
                            milliseconds.
                    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…/leaderboard?window=30d'
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.