diff --git a/app/cron_dashboard.py b/app/cron_dashboard.py index b049557..ac0b6fd 100644 --- a/app/cron_dashboard.py +++ b/app/cron_dashboard.py @@ -341,14 +341,7 @@ async def run(): print(e) options_flow = {} - ''' - try: - with open(f"json/market-movers/data.json", 'r') as file: - data = ujson.load(file) - market_movers = {'winner': data['gainers']['1D'][0], 'loser': data['losers']['1D'][0], 'active': data['active']['1D'][0]} - except: - market_movers = {} - ''' + market_status = check_market_hours() if market_status == 0: diff --git a/app/cron_market_movers.py b/app/cron_market_movers.py index d9267e5..7c3339e 100755 --- a/app/cron_market_movers.py +++ b/app/cron_market_movers.py @@ -275,7 +275,7 @@ async def get_pre_post_market_movers(symbols): one_day_price = ujson.load(file) # Filter out entries where 'close' is None filtered_prices = [price for price in one_day_price if price['close'] is not None] - + if price and changes_percentage and len(filtered_prices) > 300: res_list.append({ "symbol": symbol,