Fx Convert Currency
fx_convert_currencyConvert an amount between any two currencies at the latest or a historical rate. Returns the converted amount, the rate used, the actual rate date, and whether the date was snapped from a weekend/holiday to the prior business day. Cross-rates are triangulated through EUR automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ISO 8601 date (YYYY-MM-DD) for a historical rate. Omit for the latest available rate. ECB data starts 1999-01-04. Future dates are not supported. | |
| amount | Yes | Amount in the base currency to convert. Must be greater than zero. | |
| base_currency | Yes | ISO 4217 source currency code (e.g. USD). Call fx_list_currencies to get valid codes. | |
| quote_currency | Yes | ISO 4217 target currency code (e.g. EUR). The amount will be expressed in this currency. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate | No | Exchange rate used: units of quote currency per 1 unit of base currency. | |
| error | No | Present when the call failed. Absent on success. | |
| source | No | Always "ECB via Frankfurter" — the upstream data provider. | |
| rate_date | No | Actual date of the rate used for conversion. | |
| rate_type | No | Always "ECB reference (mid-market)" — these are reference rates, not tradeable bid/ask. | |
| base_amount | No | The input amount in the base currency. | |
| date_snapped | No | True when the API returned a different date than requested — ECB silently snaps weekend/holiday requests to the prior business day. | |
| quote_amount | No | The converted amount in the quote currency, rounded to 6 decimal places. | |
| base_currency | No | Source currency code. | |
| quote_currency | No | Target currency code. |