get_historical_rates
Get historical exchange rates for fixed lookback periods (1d, 7d, 30d, 1y) ending now, returning date-stamped rate points to analyze currency movements over time.
Instructions
Use this for fixed-window time-series questions like 'how has EUR/USD moved this week', 'show me the last month of GBP/JPY', or 'chart 1-year history of AUD/USD'. Returns { source, target, period, data: [{ date, rate, timestamp }, ...] } — sampling is fixed per period (1d=hourly, 7d/30d=daily, 1y=weekly) and the window always ends NOW. For a specific past datetime or custom date range use get_rates with time or from/to. For a single live rate use get_exchange_rate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Lookback window ending NOW. '1d' returns ~24 hourly points, '7d' returns 7 daily points, '30d' returns 30 daily points, '1y' returns ~52 weekly points. Defaults to '7d' if omitted. | 7d |
| source | Yes | ISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported. | |
| target | Yes | ISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported. |