From d0c6c27cf60b19e4331b65ea48a1e72ec774a036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20V=C3=A4in?= Date: Tue, 9 Nov 2021 18:47:55 +0200 Subject: [PATCH] Change VATComply API for exchange rates Change the exchangeratesapi.io to https://api.vatcomply.com rates API. I'm the original author of Exchangerates API which now has a paywall and was acquired some years ago. VATComply API will not be sold and provides the same API for exchange rates for free without requiring a API key. --- accounting/exchangeRate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounting/exchangeRate.js b/accounting/exchangeRate.js index 322a06b4..a23e1d5b 100644 --- a/accounting/exchangeRate.js +++ b/accounting/exchangeRate.js @@ -14,7 +14,7 @@ export async function getExchangeRate({ fromCurrency, toCurrency, date }) { if (!exchangeRate) { try { let res = await fetch( - `https://api.exchangeratesapi.io/${date}?base=${fromCurrency}&symbols=${toCurrency}` + `https://api.vatcomply.com/${date}?base=${fromCurrency}&symbols=${toCurrency}` ); let data = await res.json(); exchangeRate = data.rates[toCurrency];