# getBalance

> Returns the lamport balance of an account.

Source: https://docs.constant-k.com/rpc/http/getbalance/

`getBalance` returns only the lamport balance of an address, with no owner or data fields.

`getAccountInfo` returns the owner or data as well, in a single request.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Accounts
- Availability: All plans
- Rate limits: Free 5/s · Operator 50/s · Blade Runner 200/s · Nexus 500/s

## Parameters

`params` is a positional JSON array, in this order:

- `address` (string, required): Address of the account to check, base-58 encoded.
- `config` (object, optional): Optional configuration.
  - `commitment` (string, optional, one of `finalized`, `confirmed`, `processed`, default `"finalized"`): Bank state to read the balance from.
  - `minContextSlot` (integer, optional): Minimum slot the node must have processed before answering.

## Result

- `result` (object, optional): The balance in lamports, wrapped with context.
  - `context` (object, required)
    - `slot` (integer, optional)
    - `apiVersion` (string, optional)
  - `value` (integer, required): Balance, in lamports. A non-existent account reads back as 0, the same as an account that exists with zero lamports.

## Example: Get the Wrapped SOL mint's balance

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBalance",
    "params": ["So11111111111111111111111111111111111111112"]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "apiVersion": "4.3.0-rc.0",
      "slot": 447946999
    },
    "value": 1831505224699
  },
  "id": 1
}
```

## Notes

- 1 SOL equals 1,000,000,000 lamports; `value` divided by 1e9 gives SOL.
- A `value` of 0 does not distinguish an unfunded account from one that exists with a zero balance; `getAccountInfo` distinguishes the two.

