# Account Methods

> Query account balances, data, program-owned accounts, and rent exemption status on Solana.

Canonical: https://nolimitnodes.com/docs/api-reference/solana-rpc/accounts

## getAccountInfo
**POST** - JSON-RPC

Returns all information associated with the account of the provided Pubkey.

### `params[0]`, string, required

Account Pubkey as a base-58 encoded string.

### `params[1]`, object

Configuration object:
  - `encoding` (string) - `base58`, `base64`, `base64+zstd`, `jsonParsed`
  - `dataSlice` (object) - `{ offset: number, length: number }` to limit returned data
  - `commitment` (string) - commitment level

```bash curl
curl https://rpc.nln.clr3.org \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",{"encoding":"base64"}]}'
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAccountInfo",
  "params": [
    "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
    { "encoding": "base64" }
  ]
}
```

```json Response
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 1 },
    "value": {
      "data": ["", "base64"],
      "executable": false,
      "lamports": 1000000000,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 2,
      "space": 80
    }
  },
  "id": 1
}
```

***

## getBalance
**POST** - JSON-RPC

Fetches the lamport balance of the account associated with the provided Pubkey.

### `params[0]`, string, required

Account Pubkey as a base-58 encoded string.

### `params[1]`, object

Configuration object with `commitment` and `minContextSlot`.

```bash curl
curl https://rpc.nln.clr3.org \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo"]}'
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": ["83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo"]
}
```

```json Response
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 1 },
    "value": 0
  },
  "id": 1
}
```

***

## getMultipleAccounts
**POST** - JSON-RPC

Returns the account information for a list of Pubkeys (up to 100).

### `params[0]`, array, required

Array of Pubkeys as base-58 encoded strings (max 100).

### `params[1]`, object

Configuration object with `encoding`, `commitment`, `dataSlice`, `minContextSlot`.

```bash curl
curl https://rpc.nln.clr3.org \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getMultipleAccounts","params":[["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg","4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"],{"encoding":"base64"}]}'
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleAccounts",
  "params": [
    [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"
    ],
    { "encoding": "base64" }
  ]
}
```

```json Response
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 1 },
    "value": [
      {
        "data": ["", "base64"],
        "executable": false,
        "lamports": 1000000000,
        "owner": "11111111111111111111111111111111",
        "rentEpoch": 2,
        "space": 80
      },
      null
    ]
  },
  "id": 1
}
```

***

## getProgramAccounts
**POST** - JSON-RPC

Returns all accounts owned by the provided program Pubkey.

### `params[0]`, string, required

Program Pubkey as a base-58 encoded string.

### `params[1]`, object

Configuration object:
  - `encoding` (string) - data encoding format
  - `commitment` (string) - commitment level
  - `filters` (array) - filter criteria (`memcmp` or `dataSize`)
  - `dataSlice` (object) - limit returned data
  - `withContext` (boolean) - wrap result in context
  - `minContextSlot` (integer) - minimum slot for evaluation

```bash curl
curl https://rpc.nln.clr3.org \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getProgramAccounts","params":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",{"encoding":"base64","filters":[{"dataSize":165}]}]}'
```
```json Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getProgramAccounts",
  "params": [
    "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    {
      "encoding": "base64",
      "filters": [
        { "dataSize": 165 }
      ]
    }
  ]
}
```

```json Response
{
  "jsonrpc": "2.0",
  "result": [
    {
      "account": {
        "data": ["", "base64"],
        "executable": false,
        "lamports": 2039280,
        "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
        "rentEpoch": 0,
        "space": 165
      },
      "pubkey": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
    }
  ],
  "id": 1
}
```
