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

# getTokenLargestAccounts

> 返回特定 SPL 代币类型的 20 个最大账户。

## 请求参数

<ParamField body="address" type="string" required>
  Solana代币铸造地址，用于分析最大持有账户和分布模式。
</ParamField>

<ParamField body="commitment" type="string">
  请求的承诺级别。

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>


## OpenAPI

````yaml zh/openapi/rpc-http/getTokenLargestAccounts.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 用于识别主要持有者和跟踪 Solana 区块链生态系统中代币分布模式的代币集中分析 API。
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: 主网 RPC 端点
  - url: https://devnet.helius-rpc.com
    description: 开发网 RPC 端点
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getTokenLargestAccounts
      description: >-
        识别和分析任何 Solana SPL 代币的最大持有者，并提供详细的余额信息。这个强大的代币分布 API
        提供了对代币集中模式的洞察，揭示主要持有者（“鲸鱼”）及其相对位置。对于市场分析、代币分布审计、投资者关系和 DAO
        治理跟踪至关重要。自动返回按余额降序排列的地址，并进行适当的小数格式化，以便立即集成到分析仪表板和监控工具中。
      operationId: getTokenLargestAccounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: JSON-RPC 协议版本。
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 请求的唯一标识符。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTokenLargestAccounts
                  description: 要调用的 RPC 方法名称。
                  example: getTokenLargestAccounts
                  default: getTokenLargestAccounts
                params:
                  type: array
                  description: 用于查询特定铸币的最大代币账户的参数。
                  default:
                    - he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A
                  items:
                    oneOf:
                      - type: string
                        description: Solana 代币铸币地址，用于分析最大持有账户和分布模式。
                        example: he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A
                      - type: object
                        description: 配置对象。
                        properties:
                          commitment:
                            type: string
                            description: 请求的承诺级别。
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
            examples:
              tokenRequest:
                $ref: '#/components/examples/tokenLargestAccountsRequest'
      responses:
        '200':
          description: 成功检索到最大代币账户。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC 协议版本。
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: 与请求匹配的标识符。
                    example: '1'
                  result:
                    type: object
                    description: 上下文和代币账户详细信息。
                    properties:
                      context:
                        type: object
                        description: 响应的上下文。
                        properties:
                          slot:
                            type: integer
                            description: 获取数据的插槽。
                            example: 1114
                      value:
                        type: array
                        description: 包含其余额的代币账户列表。
                        items:
                          type: object
                          properties:
                            address:
                              type: string
                              description: 持有大量代币供应的Solana钱包地址。
                              example: FYjHNoFtSQ5uijKrZFyYAxvEr87hsKXkXcxkcmkBAf4r
                            amount:
                              type: string
                              description: 此主要持有账户的原始代币余额，不含小数格式。
                              example: '771'
                            decimals:
                              type: integer
                              description: 代币定义的小数位数，用于正确的余额表示。
                              example: 2
                            uiAmount:
                              type: number
                              description: 此主要持有者的人类可读代币余额，具有正确的小数格式（已弃用）。
                              example: 7.71
                              deprecated: true
                            uiAmountString:
                              type: string
                              description: 此主要持有者代币余额的规范字符串表示，带有小数位。
                              example: '7.71'
              examples:
                tokenResponse:
                  $ref: '#/components/examples/tokenLargestAccountsResponse'
        '400':
          description: 错误请求 - 请求参数无效或请求格式错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: 未授权 - API密钥无效或缺失。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 未授权
                id: '1'
        '429':
          description: 请求过多 - 超过速率限制。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: 请求过多
                id: '1'
        '500':
          description: 内部服务器错误 - 服务器发生错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 内部错误
                id: '1'
        '503':
          description: 服务不可用 - 服务暂时不可用。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: 服务不可用
                id: '1'
        '504':
          description: 网关超时 - 请求超时。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: 网关超时
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  examples:
    tokenLargestAccountsRequest:
      value:
        jsonrpc: '2.0'
        id: '1'
        method: getTokenLargestAccounts
        params:
          - he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A
    tokenLargestAccountsResponse:
      value:
        jsonrpc: '2.0'
        id: '1'
        result:
          context:
            slot: 1114
          value:
            - address: FYjHNoFtSQ5uijKrZFyYAxvEr87hsKXkXcxkcmkBAf4r
              amount: '771'
              decimals: 2
              uiAmount: 7.71
              uiAmountString: '7.71'
            - address: BnsywxTcaYeNUtzrPxQUvzAWxfzZe3ZLUJ4wMMuLESnu
              amount: '229'
              decimals: 2
              uiAmount: 2.29
              uiAmountString: '2.29'
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC 协议版本。
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 错误代码。
              example: -32602
            message:
              type: string
              description: 错误信息。
            data:
              type: object
              description: 关于错误的附加数据。
        id:
          type: string
          description: 与请求匹配的标识符。
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        您的 Helius API
        密钥。您可以在[仪表板](https://dashboard.helius.dev/api-keys)中免费获取一个。

````