Skip to main content
GET /v1/fx/rates/:market/history

Request

Run these examples on your server. JavaScript and Python use the clients in the quickstart; configure COTIZAVE_API_KEY there.

Two response shapes

With date, returns the last record captured before the end of that UTC day. The capture may be from an earlier day if that day has no data. date is the requested date; check captured_at and updated_at. Illustrative response: figures and dates are not current quotes.
Without date, returns an object with points, including when from and to are omitted; not a top-level array. Example collection with two points: Illustrative response: figures and dates are not current quotes.

Granularity and retention

daily returns the last available capture for each UTC day. raw returns individual captures, up to 5,000: if truncated, it keeps the most recent ones, orders them chronologically, adjusts from and adds truncated: true. Do not fill gaps as though they were new observations. Plan retention does not guarantee every market has data for that entire period. Series start dates and source interruptions limit actual coverage. Market access restrictions also apply.

Errors

400 for invalid dates, range, granularity or parameters. 403 history_out_of_retention includes details.max_days; 402 feature_not_in_plan applies to a restricted market. 404 when no point record is available. A collection may have count: 0 and points: []. The common errors for authentication, quota and availability also apply. API error responses are JSON; branch on code, not on the text of message.

Charts and reconciliation

Use captured_at as the observation time and updated_at as the source timestamp. Units depend on the market: eur_reference is VES/EUR; USD markets are VES/USD. Do not mix these units in a chart.

Dates and records

History groups captures by UTC, not by local dates in Australia, Argentina or Venezuela. A nearby capture does not establish the value date required for an invoice, and history does not return effective_date. Save that date and rate when issuing the record; do not reconstruct them by assuming date means value date.