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

# getBalance

> Mengembalikan saldo lamport dari akun dengan Pubkey yang diberikan.

## Parameter Permintaan

<ParamField body="address" type="string" required>
  Pubkey akun yang akan dikueri (string berkode base-58).
</ParamField>

<ParamField body="commitment" type="string">
  Tingkat komitmen untuk permintaan.

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

<ParamField body="minContextSlot" type="number">
  Slot minimum tempat permintaan dapat dievaluasi.
</ParamField>


## OpenAPI

````yaml id/openapi/rpc-http/getBalance.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API pengambilan saldo dompet Solana yang cepat dan andal untuk mendapatkan
    saldo SOL akun dengan tingkat komitmen yang dapat dikonfigurasi guna
    memberikan jaminan finalitas yang berbeda.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Endpoint RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Endpoint RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBalance
      description: >
        Ambil saldo SOL native untuk alamat dompet Solana apa pun dengan tingkat
        finalitas yang dapat dikonfigurasi.

        API penting ini menyediakan akses cepat ke saldo akun dalam lamport (1
        SOL = 1.000.000.000 lamport),

        dengan mendukung berbagai tingkat komitmen untuk menyeimbangkan
        kecepatan dan jaminan finalitas.

        Sangat penting untuk dompet, aplikasi keuangan, platform perdagangan,
        dan layanan apa pun yang perlu

        melacak saldo akun Solana secara real-time.
      operationId: getBalance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Versi protokol JSON-RPC.
                  default: '2.0'
                id:
                  type: string
                  description: Pengidentifikasi unik untuk permintaan.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getBalance
                  description: Nama metode RPC yang akan dipanggil.
                  default: getBalance
                params:
                  type: array
                  description: Parameter untuk permintaan.
                  default:
                    - 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                  items:
                    oneOf:
                      - type: string
                        description: >-
                          Pubkey akun yang akan dikueri (string berkode
                          base-58).
                        example: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                      - type: object
                        description: Opsi konfigurasi tambahan untuk permintaan.
                        properties:
                          commitment:
                            type: string
                            description: Tingkat komitmen untuk permintaan.
                            enum:
                              - processed
                              - confirmed
                              - finalized
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: Slot minimum tempat permintaan dapat dievaluasi.
                            example: 1
      responses:
        '200':
          description: Saldo akun berhasil diambil.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: object
                    properties:
                      context:
                        type: object
                        properties:
                          slot:
                            type: integer
                            description: Slot informasi yang dikembalikan.
                            example: 1
                      value:
                        type: integer
                        description: Saldo akun dalam lamport.
                        example: 0
        '400':
          description: >-
            Permintaan Tidak Valid - Parameter permintaan tidak valid atau
            format permintaan salah.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Parameter tidak valid
                id: '1'
        '401':
          description: Tidak Diotorisasi - Kunci API tidak valid atau tidak tersedia.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Tidak diotorisasi
                id: '1'
        '429':
          description: Terlalu Banyak Permintaan - Batas laju terlampaui.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Terlalu banyak permintaan
                id: '1'
        '500':
          description: Kesalahan Server Internal - Terjadi kesalahan pada server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Kesalahan internal
                id: '1'
        '503':
          description: Layanan Tidak Tersedia - Layanan tidak tersedia untuk sementara.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Layanan tidak tersedia
                id: '1'
        '504':
          description: Waktu Tunggu Gateway Habis - Waktu tunggu permintaan habis.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Waktu tunggu gateway habis
                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
        id:
          type: string
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Kunci API Helius Anda. Anda dapat memperolehnya secara gratis di
        [dasbor](https://dashboard.helius.dev/api-keys).

````