diff --git a/modules/currency.py b/modules/currency.py index 6a9ece4..75ea0d7 100755 --- a/modules/currency.py +++ b/modules/currency.py @@ -8,7 +8,7 @@ import requests import config from module import commands, example -CUR_URI = "https://v3.exchangerate-api.com/bulk/{API_KEY}/{CUR_FROM}" +CUR_URI = "https://v6.exchangerate-api.com/v6/{API_KEY}/latest/{CUR_FROM}" BTC_URI = "https://api.coindesk.com/v1/bpi/currentprice/{CUR_TO}.json" @commands('cur', 'currency', 'exchange') @@ -40,7 +40,7 @@ def exchange(bot, trigger): if data["result"] == "error": return bot.msg("Error: " + data["error"]) - rate = data["rates"].get(cur_to) + rate = data["conversion_rates"].get(cur_to) if not rate: return bot.msg("Invalid output currency. Must be ISO 4217 compliant.")