Rate on a given date
rate_onCall this tool for the ECB rate of one pair on one date. Returns both directions and the rate date, so a reciprocal is never reported as the published figure. A date beyond the free window is shortened, never refused.
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": {
"from": "<from>",
"to": "<to>",
"date": "<date>"
},
"name": "rate_on"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Quote currency. The rate returned is 1 from = X to | |
| date | Yes | ISO date YYYY-MM-DD. If the ECB published nothing that day - every weekend, 1 January, Good Friday, Easter Monday, 1 May, 25 and 26 December - the last rate published on or before it is returned and the answer names that date. Free covers the last 90 days: an older date is shortened to the oldest free day rather than refused, and rate_date says which day the numbers are really from. Pro covers every date back to 1999-01-04 | |
| from | Yes | Base currency. The ECB quotes every currency per 1 euro, so "the ECB rate for USD" is from EUR to USD, not the other way round; invert only if the user asked for the inverse |