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

# Top wallets by realized PnL

> Wallets ranked by realized PnL over a trailing window (wallets with `last_trade_ts` in the window). Served from an event-driven per-wallet rollup (`wallet_pnl_rollup`), cache-warmed for sub-second response (300s cache).



## OpenAPI

````yaml /api-reference/openapi.json get /v2/pnl/leaderboard/top
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:
  /v2/pnl/leaderboard/top:
    get:
      tags:
        - Leaderboards & KOLs
      summary: Top wallets by realized PnL
      description: >-
        Wallets ranked by realized PnL over a trailing window (wallets with
        `last_trade_ts` in the window). Served from an event-driven per-wallet
        rollup (`wallet_pnl_rollup`), cache-warmed for sub-second response (300s
        cache).
      operationId: getLeaderboardTop
      parameters:
        - name: period
          in: query
          required: false
          schema:
            type: string
            enum:
              - 1d
              - 7d
              - 30d
              - 90d
            default: 7d
          description: Ranking window.
        - name: exclude_arbitrage
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: Exclude arbitrageur wallets.
        - name: pnl_mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - raw
              - strict
              - adjusted
            default: adjusted
          description: >-
            PnL accounting mode. `strict` (FIFO) and `adjusted` (weighted-avg
            cost) are realized-PnL figures; `raw` is **net cash-flow** (Σ sells
            − Σ buys), not realized PnL. Unknown values fall back to `adjusted`.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 1000
          description: Page size.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
          description: Page offset.
      responses:
        '200':
          description: Leaderboard page
          content:
            application/json:
              schema:
                type: object
                properties:
                  period:
                    type: string
                  exclude_arbitrage:
                    type: boolean
                  pnl_mode:
                    type: string
                  limit:
                    type: integer
                  offset:
                    type: integer
                  leaderboard:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaderboardRow'
        '400':
          description: Invalid parameter or malformed body
          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:
    LeaderboardRow:
      type: object
      description: One ranked wallet on a realized-PnL leaderboard.
      properties:
        rank:
          type: integer
          description: Offset-aware, 1-based.
        wallet:
          type: string
        realized_sol:
          type: number
        win_rate:
          type: number
          description: Winning sells / total sells (0.0–1.0).
        trade_count:
          type: integer
          description: Σ total_sell_count.
        is_kol:
          type: boolean
        tags:
          type: array
          items:
            type: string
    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
  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.

````