> For the complete documentation index, see [llms.txt](https://savefee.gitbook.io/savefee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savefee.gitbook.io/savefee/api-reference/get-v1-balance.md).

# GET /v1/balance

Returns the prepaid balance that orders and broadcasts are charged against.

## Request

```bash
curl https://api.savefee.io/v1/balance \
  -H "Authorization: Bearer $SAVEFEE_API_KEY"
```

No parameters.

## Response `200`

```json
{
  "availableSun": 50000000,
  "depositAddress": "T…"
}
```

| Field            | Type           | Description                                                                                         |
| ---------------- | -------------- | --------------------------------------------------------------------------------------------------- |
| `availableSun`   | integer        | Spendable balance, in `sun`.                                                                        |
| `depositAddress` | string \| null | Your personal TRON address for top-ups. Stable once issued — safe to store. `null` until it exists. |

## Errors

| Status | `code`                    | Cause                                                             |
| ------ | ------------------------- | ----------------------------------------------------------------- |
| `401`  | `api_key.invalid`         | Key missing or malformed.                                         |
| `401`  | `api_key.revoked`         | The key was revoked.                                              |
| `403`  | `api_keys.ip_not_allowed` | The key has an IP allowlist and your source address is not on it. |
| `404`  | `not_found`               | The account has no wallet yet. Complete onboarding first.         |

## Notes

Call this before placing an order if you want to avoid a `402`. Prices are not fixed, so quote what the order will cost from `GET /v1/public/pricing` and check the balance against that figure rather than against a rate you stored.
