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

# getSupply

> 返回当前供应的信息。

## 请求参数

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

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

<ParamField body="excludeNonCirculatingAccountsList" type="boolean">
  是否排除非流通 SOL 储备账户的详细列表，以加快响应。
</ParamField>


## OpenAPI

````yaml zh/openapi/rpc-http/getSupply.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 用于监控 Solana 区块链生态系统中总流通量、代币经济学和分配指标的原生 SOL 供应分析 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: getSupply
      description: >-
        检索有关 Solana 原生 SOL 代币供应和分配的全面指标。这个重要的代币经济学 API 提供流通和非流通代币供应的详细细分，帮助跟踪
        SOL 在生态系统中的分布。数据包括 SOL
        总供应量、活跃流通数据、储备中的代币以及持有非流通代币的账户列表。对于金融分析师、代币经济学研究人员、市场跟踪者以及需要 Solana
        原生代币供应和分配模式准确指标的应用程序来说至关重要。
      operationId: getSupply
      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:
                    - getSupply
                  description: 要调用的 RPC 方法名称。
                  example: getSupply
                  default: getSupply
                params:
                  type: array
                  description: 可选的配置对象。
                  default: []
                  items:
                    type: object
                    properties:
                      commitment:
                        type: string
                        description: 请求的承诺级别。
                        enum:
                          - confirmed
                          - finalized
                          - processed
                        example: finalized
                      excludeNonCirculatingAccountsList:
                        type: boolean
                        description: 选择排除非流通SOL储备账户的详细列表以加快响应速度。
                        example: true
            examples:
              default:
                $ref: '#/components/examples/getSupplyRequest'
      responses:
        '200':
          description: 成功检索到供应信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                    description: JSON-RPC协议版本。
                    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: object
                        description: 提供详细信息。
                        properties:
                          total:
                            type: integer
                            description: 现有的SOL总供应量（以lamports为单位），包括流通和锁定的代币。
                            example: 1016000
                          circulating:
                            type: integer
                            description: 目前流通并可供公众使用的SOL数量（以lamports为单位）。
                            example: 16000
                          nonCirculating:
                            type: integer
                            description: 保存在储备账户中且目前不在流通中的SOL数量（以lamports为单位）。
                            example: 1000000
                          nonCirculatingAccounts:
                            type: array
                            description: 持有非流通SOL代币的Solana钱包地址列表。
                            items:
                              type: string
                            example:
                              - FEy8pTbP5fEoqMV1GdTz83byuA8EKByqYat1PKDgVAq5
                              - 9huDUZfxoJ7wGMTffUE7vh1xePqef7gyrLJu9NApncqA
                              - 3mi1GmwEE3zo2jmfDuzvjSX9ovRXsDUKHvsntpkhuLJ9
                              - BYxEJTDerkaRWBem3XgnVcdhppktBXa2HbkHPKj2Ui4Z
              examples:
                default:
                  $ref: '#/components/examples/getSupplyResponse'
        '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: Unauthorized
                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:
    getSupplyRequest:
      value:
        jsonrpc: '2.0'
        id: '1'
        method: getSupply
        params:
          - commitment: finalized
            excludeNonCirculatingAccountsList: true
    getSupplyResponse:
      value:
        jsonrpc: '2.0'
        id: '1'
        result:
          context:
            slot: 1114
          value:
            total: 1016000
            circulating: 16000
            nonCirculating: 1000000
            nonCirculatingAccounts:
              - FEy8pTbP5fEoqMV1GdTz83byuA8EKByqYat1PKDgVAq5
              - 9huDUZfxoJ7wGMTffUE7vh1xePqef7gyrLJu9NApncqA
              - 3mi1GmwEE3zo2jmfDuzvjSX9ovRXsDUKHvsntpkhuLJ9
              - BYxEJTDerkaRWBem3XgnVcdhppktBXa2HbkHPKj2Ui4Z
  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)中免费获取一个。

````