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

# getFirstAvailableBlock

> Trả về slot của khối đã xác nhận thấp nhất chưa bị xóa khỏi sổ cái.



## OpenAPI

````yaml vi/openapi/rpc-http/getFirstAvailableBlock.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API quản lý lịch sử blockchain để xác định dữ liệu khối Solana cũ nhất hiện
    có trên nút này, giúp các ứng dụng xác định ranh giới lưu giữ dữ liệu sổ
    cái.
  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: getFirstAvailableBlock
      description: >
        Truy xuất khối Solana sớm nhất vẫn có thể truy cập trong bộ nhớ sổ cái
        của nút này.

        API lịch sử blockchain này xác định ranh giới dưới của dữ liệu lịch sử
        hiện có,

        đồng thời trả về số slot của khối cũ nhất chưa bị xóa khỏi bộ nhớ.

        Các nút Solana thường không lưu trữ toàn bộ lịch sử blockchain từ khối
        khởi nguyên, mà

        thay vào đó duy trì một cửa sổ trượt gồm các khối gần đây dựa trên giới
        hạn dung lượng lưu trữ.

        Tính năng này rất cần thiết cho các ứng dụng làm việc với dữ liệu
        blockchain lịch sử, dịch vụ lưu trữ,

        bộ lập chỉ mục và công cụ phân tích cần xác định chúng có thể truy vấn
        ngược về quá khứ đến đâu

        đối với dữ liệu khối, giao dịch và tài khoản trên nút Solana cụ thể này.
      operationId: getFirstAvailableBlock
      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 của phương thức RPC cần gọi.
                  enum:
                    - getFirstAvailableBlock
                  example: getFirstAvailableBlock
                  default: getFirstAvailableBlock
      responses:
        '200':
          description: Đã truy xuất thành công slot của khối được xác nhận thấp nhất.
          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: integer
                    description: >-
                      Số slot của khối Solana sớm nhất vẫn còn trong lịch sử lưu
                      trữ của nút này, cho biết ranh giới dưới của dữ liệu
                      blockchain có thể truy cập.
                    example: 250000
        '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
            không đúng đị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: Cổng kết nối hết thời gian chờ
                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.
        id:
          type: string
          description: Mã định danh khớp với yêu cầu.
          example: '1'
  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).

````