get_rates
Fetch exchange rates for one source currency against multiple targets, at a specific past datetime, or over a date range grouped by day, week, or month.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Inclusive end of range, ISO 8601 UTC. Must be paired with `from`. Mutually exclusive with `time`. | |
| from | No | Inclusive start of range, ISO 8601 UTC (e.g. '2025-01-01T00:00:00Z'). Must be paired with `to`. Mutually exclusive with `time`. | |
| time | No | 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. | |
| group | No | 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. | |
| 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 | 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. |