> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cotizave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Historical exchange-rate statistics API

> Get minimum, maximum, average, and change over observed closes with stats=1 on a rate history endpoint.

Add `stats=1` to a rate's history. Get minimum, maximum, average, deviation, and change from observed closes. Optional `from` and `to` must stay within plan retention.

```bash curl theme={null}
curl "https://api.cotizave.com/v2/fx/VE/rates/ve-bcv/history?stats=1" \
  -H "X-API-Key: $COTIZAVE_API_KEY"
```

Illustrative response (sample dates and values; the effective range depends on your plan):

```json theme={null}
{
  "id": "ve-bcv",
  "market": "reference",
  "base": "USD",
  "quote": "VES",
  "from": "2026-11-03",
  "to": "2026-11-05",
  "granularity": "daily",
  "stats": {
    "count": 3,
    "min": 200,
    "max": 204,
    "avg": 202,
    "stddev": 2,
    "first": { "date": "2026-11-03", "mid": 200 },
    "last": { "date": "2026-11-05", "mid": 204 },
    "change": 4,
    "change_pct": 2
  }
}
```

`count` is the number of days with data, not calendar days. An empty range returns `404 history_not_available`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.