diff --git a/ranchimallflo_api.py b/ranchimallflo_api.py index 3dda4ab..c91ca27 100644 --- a/ranchimallflo_api.py +++ b/ranchimallflo_api.py @@ -1139,16 +1139,13 @@ def updatePrices(): prices = {} # USD -> INR - response = requests.get( - f"https://api.exchangeratesapi.io/latest?base=USD&symbols=INR") + response = requests.get(f"https://api.exchangerate-api.com/v4/latest/usd") try: price = response.json() - if price['success'] == False: - raise ValueError('API response error') prices['USDINR'] = price['rates']['INR'] except ValueError: response = requests.get( - f"https://api.exchangerate-api.com/v4/latest/usd") + f"https://api.exchangeratesapi.io/latest?base=USD&symbols=INR") try: price = response.json() prices['USDINR'] = price['rates']['INR']