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

# Get Token Holders (Top 100)

> 返回指定代币持币量前 100 的地址及合计。可选扩展可附带钱包身份、单币维度与全生命周期盈亏（PnL）。

## SDK Example

<CodeGroup>
  ```typescript SDK
  import { Client } from '@solana-tracker/data-api';

  const client = new Client({ apiKey: 'YOUR_API_KEY' });

  const data = await client.getTokenHolders('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');

  ```
</CodeGroup>


## OpenAPI

````yaml /cn/data-api/openapi.json get /tokens/{tokenAddress}/holders
openapi: 3.1.0
info:
  title: Solana Tracker 数据 API
  description: Solana Tracker 数据 API：提供代币价格、持币地址、成交、图表、钱包数据、风险信号与市场分析等能力。
  version: 1.0.0
  contact:
    email: contact@solanatracker.io
servers:
  - url: https://data.solanatracker.io
    description: 生产环境
security:
  - apiKey: []
paths:
  /tokens/{tokenAddress}/holders:
    get:
      tags:
        - Tokens
      summary: Get Token Holders (Top 100)
      description: 返回指定代币持币量前 100 的地址及合计。可选扩展可附带钱包身份、单币维度与全生命周期盈亏（PnL）。
      parameters:
        - name: tokenAddress
          in: path
          required: true
          schema:
            type: string
        - name: enrich
          in: query
          description: 可选扩展模块：填 identity、walletPnl、identity,walletPnl、all 或 *；省略则不执行额外扩展。
          schema:
            type: string
            example: all
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldersResponse'
              example:
                total: 2
                enrich:
                  - identity
                  - walletPnl
                accounts:
                  - wallet: HYLHTXn74S378oYQHmoJa9yqrfr3DCd8TZtnFCNvySC5
                    amount: 1032622458.645721
                    value:
                      quote: 7.100269258380428
                      usd: 597.7253928072596
                    percentage: 103.2622458645721
                    identity:
                      pool:
                        program: pumpfun
                        poolAddress: HYLHTXn74S378oYQHmoJa9yqrfr3DCd8TZtnFCNvySC5
                      type: pool
                      tags:
                        - pool
                  - wallet: BwWK17cbHxwWBKZkUYvzxLcNQ1YVyaFezduWbtm2de6s
                    amount: 967377541.354279
                    value:
                      quote: 6.651647909279076
                      usd: 559.9588853192754
                    percentage: 96.7377541354279
                    pnl:
                      wallet:
                        realized: 63155439.72
                        unrealized: 21353443.56
                        total: 84508883.29
                        invested: 203648590.41
                        proceeds: 266804030.13
                        totalTrades: 24242430
                        tokensTraded: 639911
                      token:
                        realized: 63.48
                        unrealized: -2.48
                        total: 61
                        invested: 48.27
                        proceeds: 109.27
                        roi: 126.36
                        buys: 5
                        sells: 6
                        totalTrades: 11
                        balance: 967377541.354279
                        costBasis: 2.48
                        value: 0
                        price: 0
                        avgCost: 0
                        totalBought: 31796306.208048
                        totalSold: 64418764.853769004
                        avgBuy: 9.65
                        avgSell: 18.21
                        firstBuy: 1779813188896
                        lastBuy: 1779813195367
                        firstSell: 1779813188038
                        lastSell: 1779813194596
                        firstTrade: 1779813188038
                        lastTrade: 1779813195367
                        holdTimeSecs: 26
                    identity:
                      bot:
                        name: Mayhem Bot
                        avatar: >-
                          https://kol-avatar.solanatracker.io/BwWK17cbHxwWBKZkUYvzxLcNQ1YVyaFezduWbtm2de6s
                      name: Mayhem Bot
                      avatar: >-
                        https://kol-avatar.solanatracker.io/BwWK17cbHxwWBKZkUYvzxLcNQ1YVyaFezduWbtm2de6s
                      type: bot
                      tags:
                        - bot
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getTokenHolders('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
      x-code-samples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getTokenHolders('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
components:
  schemas:
    HoldersResponse:
      type: object
      properties:
        total:
          type: integer
        enrich:
          type: array
          items:
            type: string
          description: >-
            List of enrichment modules applied to this response. Omitted when
            enrichment is not requested.
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/HolderAccount'
    HolderAccount:
      type: object
      properties:
        wallet:
          type: string
        amount:
          type: number
        value:
          type: object
          properties:
            quote:
              type: number
            usd:
              type: number
        percentage:
          type: number
        pnl:
          type: object
          description: >-
            Optional enrichment when `walletPnl` is requested and the wallet has
            traded this token. `wallet` is lifetime wallet PnL; `token` is flat
            per-token position PnL aligned with PnL V2.
          properties:
            wallet:
              $ref: '#/components/schemas/EnrichedWalletPnl'
            token:
              $ref: '#/components/schemas/EnrichedTokenPnl'
        identity:
          $ref: '#/components/schemas/EnrichedIdentity'
    EnrichedWalletPnl:
      type: object
      properties:
        realized:
          type: number
        unrealized:
          type: number
        total:
          type: number
        invested:
          type: number
        proceeds:
          type: number
        totalTrades:
          type: integer
        tokensTraded:
          type: integer
    EnrichedTokenPnl:
      type: object
      description: >-
        Per-token PnL for the holder on this mint. Present when `walletPnl`
        enrichment is requested.
      properties:
        realized:
          type: number
          description: Profit/loss from closed trades on this token (USD).
        unrealized:
          type: number
          description: Paper profit/loss on tokens still held (USD).
        total:
          type: number
          description: Sum of realized + unrealized PnL (USD).
        invested:
          type: number
          description: Total cost basis — USD spent buying this token.
        proceeds:
          type: number
          description: Total USD received from sales of this token.
        buys:
          type: integer
          description: Number of buy transactions.
        sells:
          type: integer
          description: Number of sell transactions.
        totalTrades:
          type: integer
          description: Total transactions (buys + sells).
        roi:
          type: number
          description: Return on investment percentage.
        balance:
          type: number
          description: Current token balance (native units).
        costBasis:
          type: number
          description: Cost basis of remaining held tokens (USD).
        value:
          type: number
          description: Current USD value of held tokens.
        price:
          type: number
          description: Current token price in USD.
        totalBought:
          type: number
          description: Total tokens purchased (native units).
        totalSold:
          type: number
          description: Total tokens sold (native units).
        avgBuy:
          type: number
          description: Average buy size in USD.
        avgSell:
          type: number
          description: Average sell size in USD.
        firstBuy:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the first buy.
        lastBuy:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the most recent buy.
        firstSell:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the first sell.
        lastSell:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the most recent sell.
        firstTrade:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the first trade.
        lastTrade:
          type:
            - integer
            - 'null'
          description: Unix ms timestamp of the most recent trade.
        avgCost:
          type:
            - number
            - 'null'
          description: Average cost per token in USD.
        holdTimeSecs:
          type:
            - integer
            - 'null'
          description: >-
            How long the position has been (or was) held, in seconds (first buy
            to last sell for closed bags, live duration for open bags).
    EnrichedIdentity:
      type: object
      description: >-
        Optional token-context identity enrichment for a holder wallet. Only
        known fields are returned. Common `type` values include `pool`, `bot`,
        `kol`, `developer`, and platform tags.
      properties:
        name:
          type: string
        twitter:
          type: string
        avatar:
          type: string
        type:
          type: string
          description: >-
            Primary label for single-badge UIs, such as `pool`, `bot`, `kol`,
            `developer`, or a platform tag.
        tags:
          type: array
          items:
            type: string
        platforms:
          type: array
          items:
            type: string
        pool:
          type: object
          properties:
            program:
              type: string
            poolAddress:
              type: string
        developer:
          type: object
          properties:
            token:
              type: string
            via:
              type: array
              items:
                type: string
            pools:
              type: array
              items:
                type: string
            creationTx:
              type: string
            createdAt:
              type: integer
        bot:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            avatar:
              type:
                - string
                - 'null'
              format: uri
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 用于鉴权的 API Key

````