lohivol added for crypto
This commit is contained in:
parent
611a1d385b
commit
f49d1edd36
@ -613,7 +613,7 @@ def updateCrypto(api_key, logf):
|
|||||||
all_crypto_settings = json.load(f)
|
all_crypto_settings = json.load(f)
|
||||||
f.close()
|
f.close()
|
||||||
except:
|
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']
|
coin_info = all_crypto_settings['symbols']
|
||||||
symbol_base = list(coin_info.keys())
|
symbol_base = list(coin_info.keys())
|
||||||
@ -642,7 +642,7 @@ def updateCrypto(api_key, logf):
|
|||||||
|
|
||||||
if symbol.upper() + ',' + base.upper() == sb:
|
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
|
all_crypto_settings['symbols'] = coin_info
|
||||||
with open('csv/crypto_settings.json', 'w+') as f:
|
with open('csv/crypto_settings.json', 'w+') as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user