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

# getEpochInfo

> getEpochInfo trả về thông tin chi tiết về epoch hiện tại của Solana — slot tuyệt đối, độ cao khối, số epoch, chỉ mục slot và số slot trong mỗi epoch — để theo dõi tiến trình của epoch.

## Tham số yêu cầu

<ParamField body="commitment" type="string">
  Mức cam kết cho yêu cầu.

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

<ParamField body="minContextSlot" type="number">
  Slot tối thiểu mà tại đó yêu cầu có thể được đánh giá.
</ParamField>


## OpenAPI

````yaml vi/openapi/rpc-http/getEpochInfo.yaml POST /
openapi: 3.1.0
info:
  title: API RPC Solana
  version: 1.0.0
  description: >-
    API giám sát epoch Solana toàn diện để theo dõi tiến trình chu kỳ trình xác
    thực, các giai đoạn staking và chỉ số thời gian blockchain cùng số liệu
    thống kê epoch chi tiết.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Điểm cuối RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Điểm cuối RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getEpochInfo
      description: >
        Truy xuất thông tin chi tiết về epoch Solana hiện tại, chu kỳ trình xác
        thực và tiến trình mạng.

        API thiết yếu này cung cấp các chỉ số epoch toàn diện, bao gồm số epoch
        hiện tại, tiến trình khe

        và số lượng giao dịch. Epoch đại diện cho các chu kỳ luân phiên trình
        xác thực, giai đoạn nhận phần thưởng staking và

        phân đoạn thời gian trên blockchain Solana. Đây là API thiết yếu cho các
        ứng dụng staking, công cụ tính phần thưởng,

        công cụ giám sát trình xác thực và mọi ứng dụng cần theo dõi tiến trình
        mạng hoặc triển khai

        logic dựa trên epoch, chẳng hạn như phân phối phần thưởng hoặc nâng cấp
        giao thức.
      operationId: getEpochInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  description: Phiên bản giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Mã định danh duy nhất cho yêu cầu.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: Tên phương thức RPC cần gọi.
                  enum:
                    - getEpochInfo
                  example: getEpochInfo
                  default: getEpochInfo
                params:
                  type: array
                  description: Các tham số tùy chọn cho yêu cầu.
                  default: []
                  items:
                    type: object
                    properties:
                      commitment:
                        type: string
                        description: Mức cam kết cho yêu cầu.
                        enum:
                          - confirmed
                          - finalized
                        example: finalized
                      minContextSlot:
                        type: integer
                        description: Khe tối thiểu mà tại đó yêu cầu có thể được đánh giá.
                        example: 1000
      responses:
        '200':
          description: Đã truy xuất thành công thông tin epoch.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Phiên bản giao thức JSON-RPC.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Mã định danh khớp với yêu cầu.
                    example: '1'
                  result:
                    type: object
                    properties:
                      absoluteSlot:
                        type: integer
                        description: >-
                          Số khe Solana tuyệt đối hiện tại, biểu thị tiến trình
                          blockchain toàn cục.
                        example: 166598
                      blockHeight:
                        type: integer
                        description: >-
                          Chiều cao hiện tại của blockchain Solana tính theo
                          khối, hữu ích để theo dõi mức tăng trưởng tổng thể của
                          chuỗi.
                        example: 166500
                      epoch:
                        type: integer
                        description: >-
                          Số epoch Solana hiện tại, biểu thị chu kỳ trình xác
                          thực và giai đoạn staking.
                        example: 27
                      slotIndex:
                        type: integer
                        description: >-
                          Vị trí hiện tại trong epoch, cho biết tiến trình của
                          chu kỳ trình xác thực.
                        example: 2790
                      slotsInEpoch:
                        type: integer
                        description: >-
                          Tổng số khe trong epoch hiện tại, xác định thời lượng
                          epoch và độ dài lịch trình trình xác thực.
                        example: 8192
                      transactionCount:
                        type: integer
                        nullable: true
                        description: >-
                          Tổng số giao dịch thành công đã được xử lý trên Solana
                          kể từ khối khởi nguyên.
                        example: 22661093
              examples:
                default:
                  value:
                    jsonrpc: '2.0'
                    id: '1'
                    result:
                      absoluteSlot: 166598
                      blockHeight: 166500
                      epoch: 27
                      slotIndex: 2790
                      slotsInEpoch: 8192
                      transactionCount: 22661093
        '400':
          description: >-
            Yêu cầu không hợp lệ - Tham số yêu cầu không hợp lệ hoặc yêu cầu sai
            định dạng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Tham số không hợp lệ
        '401':
          description: Không được phép - Khóa API không hợp lệ hoặc bị thiếu.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Không được phép
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Quá nhiều yêu cầu
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Lỗi nội bộ
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Dịch vụ không khả dụng
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Hết thời gian chờ cổng kết nối
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Phiên bản giao thức JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Mã lỗi.
              example: -32602
            message:
              type: string
              description: Thông báo lỗi.
            data:
              type: object
              description: Dữ liệu bổ sung về lỗi.
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Khóa API Helius của bạn. Bạn có thể nhận khóa miễn phí trong [bảng điều
        khiển](https://dashboard.helius.dev/api-keys).

````