# Get ledger balances

Fetches ledger balances.

```http
GET https://api.pozy.ai/v1/ledger/balances
```

- Area: Creators / Ledger
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `scopeType` (string, required)
- `scopeId` (string, required)
- `currency` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/ledger/balances?scopeType=string&scopeId=6c4ddacb1bf27185a5c9a056" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ledger/balances?scopeType=string&scopeId=6c4ddacb1bf27185a5c9a056", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/ledger/balances",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "scopeType": "string",
        "scopeId": "6c4ddacb1bf27185a5c9a056",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `scopeType`, string
- `scopeId`, string
- `currency`, string
- `balances`, map of integer

```json
{
  "scopeType": "string",
  "scopeId": "6c4ddacb1bf27185a5c9a056",
  "currency": "USD",
  "balances": {
    "key": 1
  }
}
```
