From f49d1edd36303e30621307969e96400939e66396 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 3 Aug 2023 18:02:14 +0800 Subject: [PATCH] lohivol added for crypto --- database_caller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database_caller.py b/database_caller.py index 4000200..e1c793d 100755 --- a/database_caller.py +++ b/database_caller.py @@ -613,7 +613,7 @@ def updateCrypto(api_key, logf): all_crypto_settings = json.load(f) f.close() except: - all_crypto_settings = {"feature": "Stocks", "speed": "medium","speed2": "medium", "animation": "down", "percent": False, "point": True, "logos": True, "chart": False, "title": True, "symbols": {"ETH,USD": {"current": "2629.32", "24hr_change": "-27.6432", "percent_change": "-1.04"}, "BTC,USD": {"current": "38161.00", "24hr_change": "-50.8386", "percent_change": "-0.13"}, "BNB,USD": {"current": "372.57", "24hr_change": "0.4140", "percent_change": "0.11"}, "ADA,BTC": {"current": "0.0000", "24hr_change": "-0.0000", "percent_change": "-3.74"}}} + all_crypto_settings = {"feature": "Stocks", "speed": "medium","speed2": "medium", "animation": "down", "percent": False, "point": True, "logos": True, "chart": False, "title": True, "lohivol": False, "symbols": {"ETH,USD": {"current": "2629.32", "24hr_change": "-27.6432", "percent_change": "-1.04"}, "BTC,USD": {"current": "38161.00", "24hr_change": "-50.8386", "percent_change": "-0.13"}, "BNB,USD": {"current": "372.57", "24hr_change": "0.4140", "percent_change": "0.11"}, "ADA,BTC": {"current": "0.0000", "24hr_change": "-0.0000", "percent_change": "-3.74"}}} coin_info = all_crypto_settings['symbols'] symbol_base = list(coin_info.keys()) @@ -642,7 +642,7 @@ def updateCrypto(api_key, logf): if symbol.upper() + ',' + base.upper() == sb: - coin_info[symbol.upper() + ',' + base.upper()] = {'current': d['price'], '24hr_change': d['price_over_24hr'], 'percent_change': d['percent_over_24hr']} + coin_info[symbol.upper() + ',' + base.upper()] = {'current': d['price'], '24hr_change': d['price_over_24hr'], 'percent_change': d['percent_over_24hr'], 'volume': d['volume'], 'day_low': d['day_low'], 'day_high': d['day_high']} all_crypto_settings['symbols'] = coin_info with open('csv/crypto_settings.json', 'w+') as f: