Get official exchange rate (ECB, Banxico FIX)
get_fx_rateUse this when you need an official exchange rate for a date for invoicing, reports or reconciliation: European Central Bank euro reference rates (30+ currencies incl. USD, GBP, JPY, CHF, MXN, BRL, CNY, INR; cross rates derived via EUR; history since 1999) or, with params.source "banxico", the Banco de Mexico FIX USD/MXN rate published in the DOF (requires a BANXICO_TOKEN on the server; otherwise SOURCE_UNAVAILABLE without charge). Weekends and holidays return the last published rate before the date (rateDate) unless exactDate is true. Optional amount returns the converted value. Unknown currencies return UNSUPPORTED_COUNTRY without charge.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_fx_rate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Quote currency, ISO 4217, e.g. "MXN", "GBP", "JPY". | |
| date | No | Rate date YYYY-MM-DD (e.g. "2026-10-15"). Omit for the latest published rate. Weekends/holidays use the last published rate before that date unless params.exactDate is true. | |
| from | No | Base currency, ISO 4217, e.g. "USD", "EUR", "MXN". | |
| items | No | Batch mode: up to 500 items, each with the same fields as a single call. Omit when validating a single value through the top-level fields. | |
| amount | No | Optional amount in `from` currency to convert; the result includes `converted` in `to` currency. | |
| source | No | "ecb" (default): European Central Bank euro reference rates, 30+ currencies, cross rates via EUR. "banxico": Banco de Mexico FIX USD/MXN (series SF43718, the rate published in the DOF); USD/MXN pairs only, requires BANXICO_TOKEN on the server. | ecb |
| exactDate | No | If true, only the exact date is accepted (no rate on weekends/holidays -> found:false). Default false: last published rate on or before the date. |