Currency rate history
get_historyReturn one currency's rate series over a date range, expressed against base: rates maps each date (or aggregated period) to units of currency per 1 base. Use for a line chart or raw daily/weekly/monthly/yearly points for one currency. Use analyze_history for computed change, trend, and movers; use convert or get_rates for a single value or snapshot. Defaults: to today, from 7 days earlier, base USD, interval daily; coarser intervals average the daily rates per bucket. Returns { currency, base, interval, from, to, rates }. Free plans are limited to the last 30 days; an invalid code or missing history is a 404. Requires a signed-in connection; each successful call bills 1 API request.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"currency": "<currency>"
},
"name": "get_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date YYYY-MM-DD (UTC). Defaults to today; a future date clamps to today. | |
| base | No | Base currency the rates are expressed against (3-letter ISO 4217). Defaults to USD. | |
| from | No | Start date YYYY-MM-DD (UTC). Defaults to 7 days before `to`. | |
| currency | Yes | The currency whose history to fetch (3-letter ISO 4217), e.g. INR. One currency per call. | |
| interval | No | Aggregation: daily (default), weekly, monthly, or yearly. Coarser intervals average the daily rates per bucket (weekly key = the week's Monday, monthly = YYYY-MM, yearly = YYYY). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| base | Yes | ||
| from | Yes | ||
| rates | Yes | ||
| currency | Yes | ||
| interval | Yes |