bugfixing by removing symbols with -

This commit is contained in:
MuslemRahimi 2024-12-27 09:05:01 +01:00
parent f48e193958
commit 774cec78cf
2 changed files with 2 additions and 1 deletions

View File

@ -351,6 +351,8 @@ async def fetch_tickers():
db = StockDatabase('backup_db/stocks.db')
loop = asyncio.get_event_loop()
all_tickers = loop.run_until_complete(fetch_tickers())
all_tickers = [item for item in all_tickers if '-' not in item['symbol'] or item['symbol'] in ['BRK-A', 'BRK-B']]
#all_tickers = [item for item in all_tickers if item['symbol'] == 'ZJK']
'''
existing_names = set()

View File

@ -1863,7 +1863,6 @@ async def get_stock(
0 if item.get('marketCap') is None else -item['marketCap']
)
)[:5]
return JSONResponse(content=orjson.loads(orjson.dumps(results)))