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

# getMinimumBalanceForRentExemption

> Trả về số dư tối thiểu cần thiết để tài khoản được miễn tiền thuê.

## Tham số yêu cầu

<ParamField body="address" type="number" required>
  Kích thước dữ liệu tài khoản tính bằng byte mà bạn cần lưu trữ trên blockchain Solana.
</ParamField>

<ParamField body="commitment" type="string">
  Mức độ commitment cho yêu cầu.

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


## OpenAPI

````yaml vi/openapi/rpc-http/getMinimumBalanceForRentExemption.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API tính toán chi phí lưu trữ tài khoản để xác định số dư SOL tối thiểu cần
    thiết nhằm giúp tài khoản Solana được miễn phí thuê lưu trữ dựa trên yêu cầu
    về kích thước dữ liệu.
  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: getMinimumBalanceForRentExemption
      description: >
        Tính số dư SOL tối thiểu cần thiết để tài khoản Solana được miễn phí
        thuê lưu trữ vĩnh viễn.

        API kinh tế thiết yếu này giúp xác định chính xác lượng SOL phải phân bổ

        cho tài khoản dựa trên kích thước dữ liệu để tránh phải trả phí thuê
        định kỳ. Các tài khoản

        duy trì số dư tối thiểu này được miễn phí thuê lưu trữ của mạng, qua đó
        đảm bảo

        khả năng tồn tại lâu dài trên blockchain. API này rất quan trọng đối với
        các nhà phát triển ví, nhà phát triển DApp

        và mọi ứng dụng tạo tài khoản trên chuỗi để ước tính chính xác chi phí
        tạo tài khoản

        và cấp đủ tiền cho tài khoản mới dựa trên yêu cầu lưu trữ dự kiến.
      operationId: getMinimumBalanceForRentExemption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
              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:
                    - getMinimumBalanceForRentExemption
                  example: getMinimumBalanceForRentExemption
                  default: getMinimumBalanceForRentExemption
                params:
                  type: array
                  description: Các tham số cho phương thức.
                  default:
                    - 50
                  items:
                    oneOf:
                      - type: integer
                        description: >-
                          Kích thước dữ liệu tài khoản tính bằng byte mà bạn cần
                          lưu trữ trên blockchain Solana.
                        example: 50
                      - type: object
                        description: Đối tượng cấu hình với các tùy chọn bổ sung.
                        properties:
                          commitment:
                            type: string
                            description: Mức cam kết cho yêu cầu.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
      responses:
        '200':
          description: >-
            Đã truy xuất thành công số dư tối thiểu để được miễn phí thuê lưu
            trữ.
          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ố dư SOL tối thiểu tính bằng lamport cần thiết để tài
                      khoản có kích thước dữ liệu này được miễn phí thuê lưu trữ
                      vĩnh viễn.
                    example: 500
        '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: Invalid params
                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: Unauthorized
                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: Too many requests
                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: Internal error
                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: Service unavailable
                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: Gateway timeout
                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).

````