fx_rate_history
Get the historical reference exchange-rate series for a currency pair.
Returns series (the daily rates) plus the metadata needed to describe it
honestly. READ series_coverage BEFORE CHARACTERISING THE PERIOD. days
is the window we look back over, NOT a promise of how much history exists:
our series start at different dates per currency, so a 365-day request
routinely returns five months. series_coverage.first_date/last_date are
what the numbers actually span, and series_coverage.truncated is true
when that is shorter than you asked for. Say "the ~N months we hold", never
"over the past year", and never fill the gap from your own knowledge.
CHECK source BEFORE ATTRIBUTING PROVENANCE. "ecb" = official ECB euro
reference fixings, weekdays only. "market" = an indicative market data feed
for a currency the ECB does not publish (AED, QAR, SAR, KWD, NGN, PKR, VND,
KZT, RUB, UAH and ~20 more). A market series is NOT an ECB series and must
never be described as one. Where a pair mixes the two, series_coverage
reports the dates lost to aligning them.
peg_context appears when either currency is pegged, including when the
peg is against some third currency: it names the anchor and the pair whose
movement you are really looking at. Take the peg date from there rather
than from memory.
An uncovered pair returns an error naming the missing leg instead of an
empty series. Report that we hold no history rather than describing the
rate as stable or range-bound.
BOTH currencies are required. Always pass the exact pair you intend. There is no implicit EUR/USD default: an omitted or mis-named currency errors rather than returning the wrong pair's history.
Args: base: Base currency (ISO 4217, e.g., "EUR") target: Target currency (ISO 4217, e.g., "USD") days: Lookback window in days (1-365, default 90). A ceiling on the window, not a guarantee of the number of points returned.
Examples: fx_rate_history("EUR", "USD", 30) fx_rate_history("GBP", "CHF", 365)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| days | No | ||
| target | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||