> ## 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.

# Histórico diario de tipos de cambio por API

> Consulta cierres diarios de una tasa por ID y rango de fechas; comprueba retención, fechas observadas y respuesta JSON.

El rango fechado de este ejemplo es ilustrativo. Al ejecutar la llamada, `from` debe estar dentro de la retención del plan y la serie debe tener observaciones; fuera de la retención se recibe `403 history_out_of_retention`. Free admite hasta 3 días.

```bash curl theme={null}
curl "https://api.cotizave.com/v2/fx/CO/rates/co-trm/history?from=2026-10-01&to=2026-10-03&granularity=daily" \
  -H "X-API-Key: $COTIZAVE_API_KEY"
```

```json theme={null}
{
  "id": "co-trm",
  "market": "co_trm",
  "base": "USD",
  "quote": "COP",
  "from": "2026-10-01",
  "to": "2026-10-03",
  "granularity": "daily",
  "count": 2,
  "next_cursor": null,
  "points": [
    {
      "date": "2026-10-01",
      "mid": 3888.2,
      "updated_at": "2026-10-01T00:00:00Z",
      "fetched_at": "2026-10-01T12:00:00Z"
    },
    {
      "date": "2026-10-02",
      "mid": 3894.8,
      "updated_at": "2026-10-02T00:00:00Z",
      "fetched_at": "2026-10-02T12:00:00Z"
    }
  ]
}
```

La serie contiene solo días con observación; no se rellenan huecos. `next_cursor` es `null` en la vista diaria.


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