refactor watchlist endpoint

This commit is contained in:
MuslemRahimi 2024-10-11 21:57:03 +02:00
parent f00b4288e9
commit 0fa400ef10

View File

@ -1166,7 +1166,7 @@ async def get_watchlist(data: GetWatchList, api_key: str = Security(get_api_key)
combined_news.append(news_dict[0])
# Keys to always include in the combined results
always_include = ['symbol', 'name', 'price', 'changesPercentage', 'marketCap','eps','pe','score','revenue','netIncome','freeCashFlow']
always_include = ['eps','pe','score','revenue','netIncome','freeCashFlow']
try:
# Create a mapping of stock_screener_data based on symbol for fast lookup