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

# getBlockHeight

> getBlockHeight возвращает текущую высоту блока в блокчейне Solana — количество блоков до последнего включительно. Она используется для проверки срока действия транзакций и прогресса.

## Параметры запроса

<ParamField body="commitment" type="string">
  Уровень подтверждения для запроса.

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

<ParamField body="minContextSlot" type="number">
  Минимальный слот, на котором может быть обработан запрос.
</ParamField>


## OpenAPI

````yaml ru/openapi/rpc-http/getBlockHeight.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  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 тестовой сети Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBlockHeight
      description: Возвращает текущую высоту блока.
      operationId: getBlockHeight
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Версия протокола JSON-RPC.
                  default: '2.0'
                id:
                  type: string
                  description: Уникальный идентификатор запроса.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getBlockHeight
                  description: Имя вызываемого метода RPC.
                  default: getBlockHeight
                params:
                  type: array
                  description: Параметры запроса.
                  default: []
                  items:
                    type: object
                    description: Параметры конфигурации запроса.
                    properties:
                      commitment:
                        type: string
                        description: Уровень подтверждения для запроса.
                        enum:
                          - processed
                          - confirmed
                          - finalized
                        example: finalized
                      minContextSlot:
                        type: integer
                        description: Минимальный слот, в котором можно обработать запрос.
                        example: 1
      responses:
        '200':
          description: Текущая высота блока успешно получена.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: integer
                    description: Текущая высота блока в формате `u64`.
                    example: 1233
        '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:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Ваш ключ API Helius. Его можно бесплатно получить на [панели
        управления](https://dashboard.helius.dev/api-keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.