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

# Convertir con un tipo de cambio histórico

> Usa date=YYYY-MM-DD en GET /v2/fx/convert para convertir con una tasa histórica disponible según el plan y la retención.

Agrega `date=YYYY-MM-DD` a `GET /v2/fx/convert`. Requiere Growth o Pro y una tasa con histórico dentro de la retención del plan.

```bash curl theme={null}
curl "https://api.cotizave.com/v2/fx/convert?from=USD&to=COP&amount=2&via=co-trm&date=2026-11-03" \
  -H "X-API-Key: $COTIZAVE_API_KEY"
```

Respuesta ilustrativa; sustituye la fecha por una que esté dentro de la retención de tu plan:

```json theme={null}
{
  "from": { "currency": "USD", "amount": 2 },
  "to": { "currency": "COP", "amount": 7800.24 },
  "rate": 3900.12,
  "via": "co-trm",
  "market": "co_trm",
  "type": "reference",
  "updated_at": "2026-11-03T00:00:00Z",
  "effective_date": "2026-11-03",
  "date": "2026-11-03",
  "staleness_sec": 0,
  "stale": false
}
```

Conserva `date`, `via` y `updated_at` junto al importe calculado. Una fecha fuera de retención devuelve `403 history_out_of_retention`.


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