Exchange Rate API
v1.0.2Real-time & historical exchange rates for 160+ currencies, mid-market (Reuters/Refinitiv).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_exchange_rate
Use this when the user asks 'what is X in Y?', 'convert X to Y', 'current rate of EUR/USD', or any single fiat-to-fiat live exchange rate question. Returns the latest mid-market rate as a JSON object like { rate: 0.9234, source, target, time } meaning 1 source = 0.9234 target. Does NOT support cryptocurrencies, commodities (XAU/XAG), or arithmetic on amounts. For multiple targets in one call use get_rates; for a past date or fixed lookback (7d/30d/1y) use get_historical_rates.
| Parameter | Type | Description |
|---|---|---|
source * | string | 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… |
target * | string | 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… |
get_historical_rates
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.
| Parameter | Type | Description |
|---|---|---|
source * | string | 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… |
target * | string | 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… |
period | string | 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. |
get_rates
Use this for (a) one source against multiple targets in a single call ('USD vs EUR, GBP, JPY'), (b) the rate at a specific past datetime ('EUR/USD on 2025-03-14T12:00Z'), or (c) a custom date range optionally bucketed by day/week/month. Returns an array [{ rate, source, target, time }, ...] — one row per target × time bucket. For a single live pair use get_exchange_rate. For fixed lookback windows (1d/7d/30d/1y ending now) use get_historical_rates.
| Parameter | Type | Description |
|---|---|---|
source * | string | 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… |
target * | string | One or more ISO 4217 codes, comma-separated, no spaces. Examples: 'EUR' (single) or 'EUR,GBP,JPY' (multi). Each target becomes a separate row in the response. |
from | string | Inclusive start of range, ISO 8601 UTC (e.g. '2025-01-01T00:00:00Z'). Must be paired with `to`. Mutually exclusive with `time`. |
group | string | Aggregation bucket when using from/to. 'day' = one rate per day, 'week' = one per ISO week, 'month' = one per calendar month. Omit for raw points. |
time | string | Single point-in-time ISO 8601 UTC timestamp (e.g. '2025-03-14T12:00:00Z'). Mutually exclusive with from/to. Omit for the latest rate. |
to | string | Inclusive end of range, ISO 8601 UTC. Must be paired with `from`. Mutually exclusive with `time`. |
list_currencies
Call this BEFORE other tools when you are unsure whether a currency code is supported, or when the user asks 'what currencies do you support?', 'is X a valid currency?', or 'what is the symbol for X?'. Returns { currencies: [{ code: 'USD', name: 'US Dollar', symbol: '$' }, ...], count } covering 160+ ISO 4217 fiat currencies. Does NOT include cryptocurrencies. Cheap to call — use it to validate user input and prevent downstream errors in get_exchange_rate / get_rates / get_historical_rates.