update market movers

This commit is contained in:
MuslemRahimi 2024-10-16 22:50:57 +02:00
parent a37074e336
commit 64967207c3

View File

@ -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,