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

# getBlockTime

> getBlockTime trả về thời gian tạo ước tính của bất kỳ khối Solana nào dưới dạng dấu thời gian Unix — gắn dấu thời gian cho các slot lịch sử và lập biểu đồ hoạt động on-chain.



## OpenAPI

````yaml vi/openapi/rpc-http/getBlockTime.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API đóng dấu thời gian blockchain để truy xuất dấu thời gian Unix tại thời
    điểm một khối Solana cụ thể được tạo, cho phép đối chiếu các sự kiện trên
    chuỗi với thời gian thực 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: getBlockTime
      description: >
        Chuyển đổi số slot của một khối Solana thành dấu thời gian thực tế tương
        ứng.

        API đối chiếu thời gian này chuyển đổi các slot blockchain thành dấu
        thời gian Unix (số giây kể từ epoch),

        cung cấp thời điểm chính xác mà một khối cụ thể được tạo. Đây là tính
        năng thiết yếu cho các ứng dụng

        cần thiết lập mối tương quan thời gian chính xác giữa các sự kiện trên
        chuỗi và thời gian thực tế,

        bao gồm giao diện hiển thị lịch sử giao dịch, công cụ báo cáo tài chính,
        hệ thống kiểm toán, nền tảng

        phân tích theo dõi các mẫu thời gian, phần mềm tính thuế và mọi ứng dụng
        cần trình bày hoạt động

        blockchain bằng ngày giờ quen thuộc, dễ đọc thay vì chỉ hiển thị các số
        slot kỹ thuật.
      operationId: getBlockTime
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Phiên bản giao thức JSON-RPC.
                  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
                  enum:
                    - getBlockTime
                  description: Tên của phương thức RPC cần gọi.
                  default: getBlockTime
                params:
                  type: array
                  description: Các tham số của yêu cầu.
                  default:
                    - 433000000
                  items:
                    type: integer
                    description: Số slot của khối cần truy xuất dấu thời gian tương ứng.
                    example: 5
      responses:
        '200':
          description: Đã truy xuất thành công thời gian của khối.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: integer
                    description: >-
                      Dấu thời gian Unix (số giây kể từ Unix epoch) tại thời
                      điểm khối Solana cụ thể này được trình xác thực tạo ra.
                    example: 1574721591
        '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ệ
                id: '1'
        '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
                id: '1'
        '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
                id: '1'
        '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ộ
                id: '1'
        '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
                id: '1'
        '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
          enum:
            - '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  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).

````