ECB exchange rates

v0.1.2
com.foreverworks/ecb Checked 2 days ago Published 5 days ago

Look up the European Central Bank's euro rate for any day, and convert between any two currencies.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

convert Convert between currencies at the ECB rate

An amount converted between any two currencies the ECB lists, at its fixing in force on a day, computed exactly and rounded once. The euro to a currency is amount x rate, a currency to the euro is amount / rate, and two currencies go through the euro as amount x rate(to) / rate(from), both rates from the same fixing; no rate is rounded on the way. Answers the result with the rate or rates used and the fixing's date, and a sentence stating the rule, so the conversion can be quoted and checked. The ECB's rates are reference rates, not rates a bank or card will give.

ParameterTypeDescription
amount *stringThe amount, as a decimal string: "1250.50", "-75". Never a number.
from *stringThe amount's currency, or EUR. ISO 4217; case ignored.
to *stringThe currency wanted, or EUR. ISO 4217; case ignored.
datestringThe day of the conversion, YYYY-MM-DD in Frankfurt (an invoice's date, a payment's); default today.
placesintegerDigits after the point in the result.
roundingstringHow the result is rounded, once: half-up (halves away from zero, as invoices round) or half-even (banker's).

health Health

Whether the ECB's reference rates can be read now: the date of its latest fixing and how many currencies it carries against the euro.

rate ECB rate on a day

The European Central Bank's euro foreign exchange reference rate in force on a day: units of the currency per 1 EUR, as the exact value the ECB published (1 EUR = 1.1052 USD), with fixing_date, the date of the fixing it is. The ECB fixes rates on TARGET working days around 16:00 CET; a weekend, a TARGET holiday, or today before 16:00 CET takes the last working day's fixing, so the answer always says which one it used. Covers every day since 1999-01-04, including currencies the ECB has since dropped (HRK, RUB, BGN, ...) on the days it published them.

ParameterTypeDescription
currency *stringISO 4217 code: USD, GBP, JPY, CHF, ...; EUR where the tool allows it; case ignored.
datestringThe day, YYYY-MM-DD in Frankfurt; default today.

rates ECB rates: every currency on a day, or a window

The ECB's reference rates as fixings, oldest first, each currency in units per 1 EUR as the ECB published it. With date (default today): every currency's rate in force that day, all from one fixing, whose date the answer gives. With from (and to, default today): every fixing the ECB published in the window, as many as fit in 2000 rates a call (a year of seven currencies, or all of them for about three months). Name currencies to narrow either; leave them out for all. Use it for a chart, an average or a check across several days.

ParameterTypeDescription
currenciesarrayISO 4217 codes, e.g. ["USD", "GBP"], without EUR; default every currency the ECB published.
datestringOne day, YYYY-MM-DD in Frankfurt: the rates in force on it. Not with from.
fromstringA window's first day, YYYY-MM-DD: every fixing from it to `to`.
tostringA window's last day, included; default today. Only with from.