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

# getSlotLeaders

> 返回给定插槽范围的插槽领导者。

## 请求参数

<ParamField body="slot" type="number" required>
  开始检索验证器计划的 Solana 插槽编号。
</ParamField>

<ParamField body="slot" type="number" required>
  要检索计划验证器身份的一系列连续插槽数量（1-5000）。
</ParamField>


## OpenAPI

````yaml zh/openapi/rpc-http/getSlotLeaders.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: getSlotLeaders
      description: >-
        检索计划为未来插槽生成区块的 Solana 验证者的有序序列。此预测共识 API
        返回即将到来的插槽范围的完整验证者轮换计划，允许应用程序预测哪些验证者将负责区块生产。对于网络监控仪表板、验证者性能跟踪、共识可视化工具以及需要预测即将到来的领导者计划的应用程序至关重要。支持在单个请求中查询多达
        5,000 个插槽，以实现高效的计划检索。
      operationId: getSlotLeaders
      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:
                    - getSlotLeaders
                  description: 要调用的RPC方法名称。
                  example: getSlotLeaders
                  default: getSlotLeaders
                params:
                  type: array
                  description: 用于指定起始槽和限制的参数。
                  default:
                    - 100
                    - 10
                  items:
                    oneOf:
                      - type: integer
                        description: 开始检索验证者计划的起始Solana槽号。
                        example: 100
                      - type: integer
                        description: 要检索计划验证者身份的连续槽数（1-5,000）。
                        example: 10
            examples:
              example1:
                $ref: '#/components/examples/getSlotLeadersRequest'
      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: array
                    description: 即将进行区块生产的Solana验证者身份的有序序列。
                    items:
                      type: string
                      description: 作为特定槽的区块生产者计划的Solana验证者身份（公钥）。
                      example: ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n
              examples:
                example1:
                  $ref: '#/components/examples/getSlotLeadersResponse'
        '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:
    getSlotLeadersRequest:
      value:
        jsonrpc: '2.0'
        id: '1'
        method: getSlotLeaders
        params:
          - 100
          - 10
    getSlotLeadersResponse:
      value:
        jsonrpc: '2.0'
        id: '1'
        result:
          - ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n
          - ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n
          - ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n
          - ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n
          - Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM
          - Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM
          - Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM
          - Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM
          - DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP
          - DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP
  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)中免费获取一个。

````