From 64967207c3dddac36bd3a6286760baf31692fc12 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 16 Oct 2024 22:50:57 +0200 Subject: [PATCH] update market movers --- app/cron_market_movers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/cron_market_movers.py b/app/cron_market_movers.py index d6bab58..2569540 100755 --- a/app/cron_market_movers.py +++ b/app/cron_market_movers.py @@ -271,7 +271,9 @@ async def get_pre_post_market_movers(symbols): pre_post_data = ujson.load(file) price = pre_post_data.get("price", None) changes_percentage = pre_post_data.get("changesPercentage", None) - if price and changes_percentage: + with open(f"json/one-day-price/{symbol}.json", 'rb') as file: + one_day_price = ujson.load(file) + if price and changes_percentage and len(one_day_price) > 300: res_list.append({ "symbol": symbol, "name": name,