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

# Top wallets by realized PnL

> Returns a paginated list of the most profitable wallets ranked by realized PnL (SOL and USD)
for the specified period. Each entry includes the wallet address, PnL in SOL/USD, and trade count.
Optionally filter by DEX platform.




## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/platform/pnl-leaderboard
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/platform/pnl-leaderboard:
    get:
      summary: Top wallets by realized PnL
      description: >
        Returns a paginated list of the most profitable wallets ranked by
        realized PnL (SOL and USD)

        for the specified period. Each entry includes the wallet address, PnL in
        SOL/USD, and trade count.

        Optionally filter by DEX platform.
      operationId: getPnlLeaderboard
      parameters:
        - name: period
          in: query
          schema:
            type: string
            enum:
              - daily
              - weekly
              - monthly
            default: daily
          description: Time period to aggregate over
        - name: platform
          in: query
          schema:
            type: string
          description: >-
            Optional DEX platform filter (e.g. pumpfun, raydiumv4, orca,
            meteoradlmm, pumpswap). Omit for global stats.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            maximum: 500
          description: Number of wallets to return (max 500)
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
          description: Pagination offset
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PnlLeaderboardResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PnlLeaderboardResponse:
      type: object
      properties:
        success:
          type: boolean
        period:
          type: string
          enum:
            - daily
            - weekly
            - monthly
        platform:
          type: string
          description: DEX platform filter applied, or "all" if unfiltered
        wallets:
          type: array
          items:
            type: object
            properties:
              signer:
                type: string
                description: Wallet address
              pnlSol:
                type: number
                description: Realized PnL in SOL
              pnlUsd:
                type: number
                description: Realized PnL in USD
              trades:
                type: integer
                description: Number of trades in this period
        limit:
          type: integer
        offset:
          type: integer
        solPriceUsd:
          type: number
        timestamp:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
        success:
          type: boolean
      example:
        error: Unauthorized
        message: Invalid API key
        code: INVALID_KEY
        success: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````