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

# Token first buyers

> Earliest buyers of a token, ordered by (first_buy_ts, first_slot, first_sig). With `enrich=1`, each buyer's current (wallet, mint) PnL is attached. Cached 60s.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/pnl/tokens/{token}/first-buyers
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/tokens/{token}/first-buyers:
    get:
      tags:
        - Wallet PnL (v2)
      summary: Token first buyers
      description: >-
        Earliest buyers of a token, ordered by (first_buy_ts, first_slot,
        first_sig). With `enrich=1`, each buyer's current (wallet, mint) PnL is
        attached. Cached 60s.
      operationId: getPnlV2FirstBuyers
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
          description: Token mint address (base58).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 500
          description: Max buyers.
        - name: enrich
          in: query
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 0
          description: When `1`, attaches each buyer's current (wallet, mint) PnL.
      responses:
        '200':
          description: First buyers
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  limit:
                    type: integer
                  enriched:
                    type: boolean
                  first_buyers:
                    type: array
                    items:
                      $ref: '#/components/schemas/FirstBuyerRow'
        '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:
    FirstBuyerRow:
      type: object
      description: >-
        An early buyer of a token, ordered by (first_buy_ts, first_slot,
        first_sig).
      properties:
        wallet:
          type: string
        first_buy_ts:
          type: integer
          description: Epoch milliseconds.
        first_buy_slot:
          type: integer
          description: Solana slot (uint64).
        first_buy_sol:
          type: number
        first_buy_tokens_atomic:
          type: integer
          description: Atomic token units bought (uint64).
        signature:
          type: string
        pnl:
          type: object
          description: >-
            Present only when `enrich=1`. Zeroed (`{realized_sol:0,
            balance_atomic:0, unrealized_sol:null}`) for buyers with no tracked
            position.
          properties:
            realized_sol:
              type: number
            balance_atomic:
              type: integer
            unrealized_sol:
              type:
                - number
                - 'null'
    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.

````