The problem
You have invoices in USD, GBP and others, and your accounting needs EUR totals using an official reference rate, not whatever a random scraper returned. The ECB publishes daily reference rates, but its feed is XML and awkward to consume. A JSON endpoint is easier.
One call
curl "https://currencykit-ecb-exchange-rates-currency-converter.p.rapidapi.com/convert?from=USD&to=EUR&amount=100" \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: currencykit-ecb-exchange-rates-currency-converter.p.rapidapi.com"
Real response (trimmed):
{"amount":100.0,"date":"2026-10-27","from":"USD","to":"EUR","rate":0.89686099,"inverse_rate":1.115,"result":89.686099,"requested_date":null}
/convert also accepts an optional date (YYYY-MM-DD) so you can convert at the invoice date. /latest takes base and symbols, and /historical and /timeseries are there for back-filling.
Script
import requests
HOST = "currencykit-ecb-exchange-rates-currency-converter.p.rapidapi.com"
HEADERS = {"X-RapidAPI-Key": "YOUR_KEY", "X-RapidAPI-Host": HOST}
invoices = [
{"id": "INV-1", "amount": 1200.00, "currency": "USD", "date": "2026-10-01"},
{"id": "INV-2", "amount": 800.50, "currency": "GBP", "date": "2026-10-15"},
]
total = 0.0
for inv in invoices:
r = requests.get(f"https://{HOST}/convert", headers=HEADERS, params={
"from": inv["currency"], "to": "EUR",
"amount": inv["amount"], "date": inv["date"]}, timeout=15)
r.raise_for_status()
data = r.json()
total += data["result"]
print(inv["id"], round(data["result"], 2), "EUR at", data["rate"], "on", data["date"])
print("Total EUR:", round(total, 2))
The date field in the response tells you which ECB publication day was actually used (weekends fall back to the previous business day).
Wiring it in
Run it from cron at month end, or call the same endpoint from an n8n HTTP Request node with the two headers above.
Limits
ECB reference rates are informational and published around 16:00 CET on business days, so they are fine for reporting but not for trading.
Doing it locally
You can parse the ECB XML yourself and cache it, which is free but means maintaining the parser, history files and weekend fallback logic. The API does that for you.
There is a free plan, so you can try it without a card: CurrencyKit on RapidAPI
Top comments (0)