Exchange rates
Read the euro reference rates of the European Central Bank, for today or a past date, and convert an amount between two currencies with them. Typical uses: convert a foreign invoice to euros, show prices in several currencies.
money ecb_rates
Description
The last daily reference rates. Result: {base: EUR, date, source (daily, 90_days, history or url), rates: {code: rate}}; the rates are exact numbers as published
The last daily reference rates. Result: {base: EUR, date, source (daily, 90_days, history or url), rates: {code: rate}}; the rates are exact numbers as published
admin
money ecb_rates
mentdb
{"base": "EUR", "date": "2026-11-09", "source": "daily", "rates": {"AUD": 1.6236, "BRL": 6.1748, "CAD": 1.5785, "CHF": 0.9164, "CNY": 7.4689, "CZK": 24.365, "DKK": 7.4753, "GBP": 0.83430, "HKD": 8.7772, "HUF": 362.99, "IDR": 20234.31, "ILS": 3.5490, "INR": 105.1435, "ISK": 136.80, "JPY": 176.79, "KRW": 1507.46, "MXN": 20.8343, "MYR": 4.5432, "NOK": 10.5325, "NZD": 1.9941, "PHP": 70.712, "PLN": 4.3843, "RON": 5.3430, "SEK": 10.9960, "SGD": 1.4328, "THB": 37.485, "TRY": 56.1199, "USD": 1.1193, "ZAR": 18.4105}}
money ecb_rates <json_params>
Description
The rates with options: date (yyyy-MM-dd, not in the future: the rates of this day; a day without rates, as a weekend or a TARGET holiday, takes the last day before, up to fallback_days), fallback_days (7, 0 to 31), url (another http or https address of a file of the same format, for a mirror, reached like rest request: any host; every failure on it gives the same message, so that it cannot probe the network), block_private (false: true resolves the host of the address first and refuses a loopback, private, link-local, local or unique local address; a DNS answer that changes between the check and the connection is not prevented), timeout_s (60, 1 to 300), max_age_s (3600, 0 to 86400: a file read less than this ago, the same UTC day, is not read again; 0 reads it at each call), max_mb (32, 1 to 64). With a date, the result also gives requested_date
The rates with options: date (yyyy-MM-dd, not in the future: the rates of this day; a day without rates, as a weekend or a TARGET holiday, takes the last day before, up to fallback_days), fallback_days (7, 0 to 31), url (another http or https address of a file of the same format, for a mirror, reached like rest request: any host; every failure on it gives the same message, so that it cannot probe the network), block_private (false: true resolves the host of the address first and refuses a loopback, private, link-local, local or unique local address; a DNS answer that changes between the check and the connection is not prevented), timeout_s (60, 1 to 300), max_age_s (3600, 0 to 86400: a file read less than this ago, the same UTC day, is not read again; 0 reads it at each call), max_mb (32, 1 to 64). With a date, the result also gives requested_date
Parameters
json_params: The options, as a JSON object - String - required
json_params: The options, as a JSON object - String - required
admin
money ecb_rates "{\"date\": \"2026-10-03\"}"
mentdb
{"base": "EUR", "date": "2026-10-02", "requested_date": "2026-10-03", "source": "90_days", "rates": {"AUD": 1.6176, "BRL": 5.861, "CAD": 1.5984, "CHF": 0.9279, "CNY": 7.5259, "CZK": 24.47, "DKK": 7.4736, "GBP": 0.85033, "HKD": 8.8084, "HUF": 369.18, "IDR": 20149.32, "ILS": 3.4408, "INR": 108.1245, "ISK": 137, "JPY": 176.99, "KRW": 1513.44, "MXN": 20.5806, "MYR": 4.5849, "NOK": 10.8315, "NZD": 2.0002, "PHP": 70.265, "PLN": 4.3775, "RON": 5.3488, "SEK": 11.29, "SGD": 1.4366, "THB": 37.71, "TRY": 55.165, "USD": 1.1225, "ZAR": 18.7839}}
Fixed result from a real call to the ECB on 2026-11-10: a date of the history
admin
money ecb_rates "{\"date\": \"2008-09-15\"}"
mentdb
{"base": "EUR", "date": "2008-09-15", "requested_date": "2008-09-15", "source": "history", "rates": {"AUD": 1.7544, "BGN": 1.9558, "BRL": 2.5871, "CAD": 1.514, "CHF": 1.5903, "CNY": 9.6864, "CZK": 24.313, "DKK": 7.4573, "EEK": 15.6466, "GBP": 0.79395, "HKD": 11.0295, "HRK": 7.1102, "HUF": 240.92, "IDR": 13372.7, "ISK": 129.73, "JPY": 149.87, "KRW": 1570.76, "LTL": 3.4528, "LVL": 0.7046, "MXN": 15.2052, "MYR": 4.8892, "NOK": 8.183, "NZD": 2.1524, "PHP": 66.51, "PLN": 3.349, "RON": 3.6195, "RUB": 36.2, "SEK": 9.5519, "SGD": 2.0342, "SKK": 30.27, "THB": 48.977, "TRY": 1.7865, "USD": 1.4151, "ZAR": 11.5609}}
money ecb_convert <amount> <from> <to>
Description
Convert an amount (a decimal with a point, 20 digits and 20 decimals at most) between two currencies of the ECB list or EUR, at the last daily rates, rounded half up to the minor units of the target currency. Result: {amount, currency, from_amount, from_currency, date, eur_rate_from, eur_rate_to}
Convert an amount (a decimal with a point, 20 digits and 20 decimals at most) between two currencies of the ECB list or EUR, at the last daily rates, rounded half up to the minor units of the target currency. Result: {amount, currency, from_amount, from_currency, date, eur_rate_from, eur_rate_to}
Parameters
amount: The amount, ex: 1234.50 - String - required
from: ISO 4217 code - String - required
to: ISO 4217 code - String - required
amount: The amount, ex: 1234.50 - String - required
from: ISO 4217 code - String - required
to: ISO 4217 code - String - required
admin
money ecb_convert "100" "EUR" "USD"
mentdb
{"amount": "111.93", "currency": "USD", "from_amount": "100", "from_currency": "EUR", "date": "2026-11-09", "eur_rate_from": 1, "eur_rate_to": 1.1193}
Fixed result from a real call to the ECB on 2026-11-10: a cross rate, USD to JPY (no minor unit)
admin
money ecb_convert "100" "USD" "JPY"
mentdb
{"amount": "15795", "currency": "JPY", "from_amount": "100", "from_currency": "USD", "date": "2026-11-09", "eur_rate_from": 1.1193, "eur_rate_to": 176.79}
Fixed result from a real call to the ECB on 2026-11-10: BGN is no longer published since the euro came to Bulgaria
admin
money ecb_convert "1" "EUR" "BGN"
mentdb
ERROR: Sorry, an error appears (the ECB gives no rate for BGN on 2026-11-09 (parameter 'to')).
money ecb_convert <amount> <from> <to> <json_params>
Description
Convert with options: date (yyyy-MM-dd, not in the future: the rates of this day; a day without rates, as a weekend or a TARGET holiday, takes the last day before, up to fallback_days), fallback_days (7, 0 to 31), url (another http or https address of a file of the same format, for a mirror, reached like rest request: any host; every failure on it gives the same message, so that it cannot probe the network), block_private (false: true resolves the host of the address first and refuses a loopback, private, link-local, local or unique local address; a DNS answer that changes between the check and the connection is not prevented), timeout_s (60, 1 to 300), max_age_s (3600, 0 to 86400: a file read less than this ago, the same UTC day, is not read again; 0 reads it at each call), max_mb (32, 1 to 64), and the rounding of money convert: mode (half_up, half_down, half_even, up, down, ceiling, floor, exact), scale (0 to 18 decimals), increment (ex: 0.05)
Convert with options: date (yyyy-MM-dd, not in the future: the rates of this day; a day without rates, as a weekend or a TARGET holiday, takes the last day before, up to fallback_days), fallback_days (7, 0 to 31), url (another http or https address of a file of the same format, for a mirror, reached like rest request: any host; every failure on it gives the same message, so that it cannot probe the network), block_private (false: true resolves the host of the address first and refuses a loopback, private, link-local, local or unique local address; a DNS answer that changes between the check and the connection is not prevented), timeout_s (60, 1 to 300), max_age_s (3600, 0 to 86400: a file read less than this ago, the same UTC day, is not read again; 0 reads it at each call), max_mb (32, 1 to 64), and the rounding of money convert: mode (half_up, half_down, half_even, up, down, ceiling, floor, exact), scale (0 to 18 decimals), increment (ex: 0.05)
Parameters
amount: The amount - String - required
from: ISO 4217 code - String - required
to: ISO 4217 code - String - required
json_params: The options, as a JSON object - String - required
amount: The amount - String - required
from: ISO 4217 code - String - required
to: ISO 4217 code - String - required
json_params: The options, as a JSON object - String - required
admin
money ecb_convert "2500.00" "GBP" "CHF" "{\"date\": \"2026-10-01\"}"
mentdb
{"amount": "2763.46", "currency": "CHF", "from_amount": "2500.00", "from_currency": "GBP", "date": "2026-10-01", "eur_rate_from": 0.85373, "eur_rate_to": 0.9437}
Fixed result from a real call to the ECB on 2026-11-10: rounded down to 5 centimes
admin
money ecb_convert "100" "USD" "CHF" "{\"increment\": \"0.05\", \"mode\": \"down\"}"
mentdb
{"amount": "81.85", "currency": "CHF", "from_amount": "100", "from_currency": "USD", "date": "2026-11-09", "eur_rate_from": 1.1193, "eur_rate_to": 0.9164}
