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

# getVersion

> 返回节点上运行的当前 Solana 版本。



## OpenAPI

````yaml zh/openapi/rpc-http/getVersion.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 运行时信息API，用于检索Solana区块链软件版本详细信息和功能集标识符，以进行兼容性验证。
  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: getVersion
      description: >-
        检索当前Solana节点软件版本和功能集信息。这个重要的API提供了关于区块链运行环境的详细信息，帮助开发人员确保他们的应用程序与网络的兼容性。版本信息包括Solana核心软件发布号和一个唯一的功能集标识符，代表节点上启用的特定功能。对于需要验证网络兼容性或实现特定版本行为的DApp开发人员、节点操作员和工具来说至关重要。
      operationId: getVersion
      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:
                    - getVersion
                  description: 要调用的RPC方法名称。
                  example: getVersion
                  default: getVersion
                params:
                  type: array
                  description: 不需要参数。
                  maxItems: 0
            examples:
              default:
                $ref: '#/components/examples/getVersionRequest'
      responses:
        '200':
          description: 成功检索到Solana版本详细信息。
          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: Solana 版本详细信息。
                    properties:
                      solana-core:
                        type: string
                        description: 此验证器上运行的 Solana 区块链节点软件发布版本。
                        example: 1.16.7
                      feature-set:
                        type: integer
                        description: 表示当前激活的特定 Solana 功能集的唯一数字标识符。
                        example: 2891131721
              examples:
                default:
                  $ref: '#/components/examples/getVersionResponse'
        '400':
          description: 错误请求 - 请求参数无效或请求格式错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 参数无效
                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:
    getVersionRequest:
      value:
        jsonrpc: '2.0'
        id: '1'
        method: getVersion
    getVersionResponse:
      value:
        jsonrpc: '2.0'
        id: '1'
        result:
          solana-core: 1.16.7
          feature-set: 2891131721
  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)中免费获取一个。

````