Converts an amount between EUR and one other currency using a stated rate (units of that currency per 1 EUR), the date it applies to, and its cited source, all supplied by the visitor.
Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Try it
Inputs
amount (number, from_currency, required) min 0 : The amount to convert
from_currency (string, required) one of: EUR, USD, GBP, JPY, CHF, CAD, AUD : Currency of the input amount
to_currency (string, required) one of: EUR, USD, GBP, JPY, CHF, CAD, AUD : Currency to convert into
rate (number, required) min 0 : Units of the non-EUR currency in this pair, per 1 EUR, at rate_date
rate_date (string, ISO date, required) : The date the rate applies to (for example an ECB reference rate date); change it and the rate together to use a different day.
rate_source (string, required) : Citation for where the rate came from (for example the ECB reference-rate page URL, or another official central-bank table); change it together with rate and rate_date when using a different table.
Outputs
result (to_currency): The converted amount at the stated rate
Steps
Exactly one of from_currency and to_currency must be EUR (or both are EUR); for two non-EUR currencies use the currency-cross-rate card instead.
The visitor supplies rate (units of the non-EUR currency per 1 EUR), rate_date (the date that rate applies to), and rate_source (the citation it came from); this method never looks up or fetches a rate itself, so any newer official table may be substituted for all three together.
If from_currency is EUR: result = amount * rate (EUR converted into the foreign currency).
If to_currency is EUR: result = amount / rate (the foreign currency converted into EUR).
If from_currency equals to_currency: result = amount unchanged, regardless of rate.
Euro foreign exchange reference rates (European Central Bank, 2026-09-30T19:29:48Z) - Documented source of the default rate/rate_date/rate_source values prefilled in the worked example and test vectors below (2026-09-30). These are daily reference rates, not live/streaming rates, and are not fetched by this method; the visitor may enter any rate, date, and source.