> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getBalance | Solana

> The Solana getBalance method returns the current balance of an account for a given public key. Available on Solana via Chainstack.

# Solana `getBalance` method

The Solana `getBalance` method returns the current balance of an account for a given public key.

This method provides the current number of lamports in the account. It is useful for checking the balance of an account at a specific commitment level.

## Parameters

* `publicKey` — the public key of the account to retrieve the balance for.
* `commitment` — (optional) the level of commitment desired:
  * `processed` — the node has processed the block and the block may be on a fork.
  * `confirmed` — the block is confirmed by the cluster as not being on a fork.
  * `finalized` — the block is finalized by the cluster.

## Response

* `value` — the current number of lamports in the account.

## Use case

A practical use case for `getBalance` is to check the current balance of a Solana account. This can be useful for wallets or other applications that need to display or make use of this information.


## OpenAPI

````yaml openapi/solana_node_api/getBalance.json POST /9de47db917d4f69168e3fed02217d15b
openapi: 3.0.0
info:
  title: getBalance example
  version: 1.0.0
  description: This is an API example for Solana's getBalance.
servers:
  - url: https://nd-326-444-187.p2pify.com
security: []
paths:
  /9de47db917d4f69168e3fed02217d15b:
    post:
      tags:
        - query
      summary: getBalance
      operationId: getBalance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: getBalance
                params:
                  type: array
                  items:
                    type: string
                    description: The public key of the account
                    default: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
                  default:
                    - 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
      responses:
        '200':
          description: Account balance
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````