Convert currency
convertConvert an amount from one currency to another. Returns {amount, currency} rounded to the target's minor units. Upstream rounds rates per direction; for low-value sources, flip via get_rates for more precision. Pass provider to use one institution's published rate, e.g. UST for a U.S. Treasury reporting rate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ISO 4217 target currency. | |
| date | No | Date YYYY-MM-DD for a past rate; omit for latest. | |
| from | Yes | ISO 4217 source currency. | |
| amount | Yes | Amount in the source currency. Normalize localized input first: '100,50' -> 100.5; German '1.000,50' -> 1000.5; English '1,000.50' -> 1000.5. | |
| provider | No | Provider key, e.g. ECB for European Central Bank or UST for U.S. Treasury reporting rates. Serves that institution's published rates instead of the blend; a date inside a monthly or quarterly provider's period returns the rate in force. Keys at https://frankfurter.dev/providers/. |