# Wallet balances

`GET /wallet/balances` · Lithos client API · Wallet · requires the `api_key` header

Source: https://lithosprotocol.org/docs/api/get-wallet-balances

Spendable ERG, ERG held for transactions in flight, and every token the wallet holds, each marked verified or not.

`nanoErgs` is the ERG available to spend right now: unreserved plain wallet boxes. Block rewards count only once claimed; see `GET /wallet/rewards`. A verified token's name, ticker and decimals come from the client's verified list. Any other token's come from the node's token index, where whoever minted the token chose them, so a token named like a verified one is told apart only by `verified`.

## Responses

### 200: Current wallet balances

`WalletBalances`

- `primaryAddress` (string, required): The wallet's main P2PK address, where change and swept rewards land
- `nanoErgs` (string, required): Unreserved ERG available to spend right now, unclaimed coinbases excluded. The figure a join quote's `affordNow` is decided against. Decimal string. 
- `reservedBoxes` (integer · int32, required): Wallet boxes held for transactions in flight or for this miner's own blocks. They are left out of `nanoErgs`. 
- `reservedNanoErgs` (string, required): Value of the held boxes this client has descriptors for, in nanoERG
- `tokens` (WalletToken[], required): Every token the wallet holds, including LIT.
  - `tokenId` (string, required)
  - `name` (string)
  - `ticker` (string): Short symbol. Verified tokens only.
  - `decimals` (integer · int32)
  - `amount` (string, required): Raw token units held. Decimal string.
  - `verified` (boolean, required): Whether the token is on the client's verified list

### 403: Missing or wrong api_key

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: Node or wallet unavailable. It may be locked. Retry.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X GET "http://localhost:9000/wallet/balances" \
  -H "api_key: $LITHOS_API_KEY"
```

## Example response

```json
{
  "primaryAddress": "3WwbzR34YmLRy3Z6WLON5hBBkX8Zm1gUHmC7tEXDNRJfHBqhsZr",
  "nanoErgs": "182400000000",
  "reservedBoxes": 2,
  "reservedNanoErgs": "18000000000",
  "tokens": [
    {
      "tokenId": "c1980d829988229516430a47a5eca376060b6ce859616db0936e78ab25cb6de7",
      "name": "LIT",
      "ticker": "LIT",
      "decimals": 9,
      "amount": "5420000000",
      "verified": true
    }
  ]
}
```
