> ## 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 traders with PnL



## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/tokens/toptraders/{tokenMint}
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    Also hosts write utilities (`/utils/sol/*`): token launch, transfer, burn,

    consolidate, fees claim/config, and agent initialize — previously on

    `router.raze.bot`. Mixer/distribute removed 2026-07-25.


    ## 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/tokens/toptraders/{tokenMint}:
    get:
      summary: Top traders with PnL
      operationId: getTopTraders
      parameters:
        - name: tokenMint
          in: path
          required: true
          schema:
            type: string
          example: Fyx78ew4wRY26gPj5CkTyuZ4kvW7CkPff5Jm2vNspump
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: Maximum number of traders to return
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopTradersResponse'
        '400':
          description: Invalid token mint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: SOL price data unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TopTradersResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            tokenMint:
              type: string
            traders:
              type: array
              items:
                type: object
                properties:
                  trader:
                    type: string
                    description: Wallet address (signer)
                  totalPnL:
                    type: number
                    description: Total profit/loss in USD
                  totalTrades:
                    type: integer
                  totalBuys:
                    type: integer
                  totalSells:
                    type: integer
                  totalVolume:
                    type: number
                    description: Total volume in USD
                  avgTradeSize:
                    type: number
                    description: Average trade size in USD
                  firstTrade:
                    type: string
                    format: date-time
                  lastTrade:
                    type: string
                    format: date-time
                  largestTrade:
                    type: number
                    description: Largest trade in USD
                  winRate:
                    type: number
                    description: Win rate as decimal (0-1)
                  avgBuyPrice:
                    type: number
                    description: Average price paid per buy
                  avgSellPrice:
                    type: number
                    description: Average price received per sell
                  buySol:
                    type: number
                    description: Total SOL spent buying.
                  sellSol:
                    type: number
                    description: Total SOL received selling.
                  boughtTokens:
                    type: number
                    description: Total tokens bought.
                  soldTokens:
                    type: number
                    description: Total tokens sold.
                  pnlSol:
                    type: number
                    description: Realized PnL in SOL.
                  isHolding:
                    type: boolean
                    description: True if buys > sells (position still open)
                  bundleTrades:
                    type: integer
                    description: Number of bundle trades
                  sniperTrades:
                    type: integer
                    description: Number of sniper trades
                  proTrades:
                    type: integer
                    description: Number of pro trader trades
                  entryDelaySeconds:
                    type: integer
                    nullable: true
                    description: Seconds between token deploy and this trader's first trade
        count:
          type: integer
        limit:
          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

````