bugfixing
This commit is contained in:
parent
e956705af4
commit
cce53995b6
@ -27,6 +27,9 @@ stock_screener_data_dict = {item['symbol']: item for item in stock_screener_data
|
||||
|
||||
quote_cache = {}
|
||||
|
||||
print(stock_screener_data_dict.get('AAPL', {}))
|
||||
|
||||
|
||||
def get_quote_data(symbol):
|
||||
"""Get quote data for a symbol from JSON file"""
|
||||
if symbol in quote_cache:
|
||||
|
||||
@ -274,7 +274,6 @@ async def get_data():
|
||||
except Exception as e:
|
||||
print(f"Error processing item {item}: {e}")
|
||||
|
||||
|
||||
|
||||
query = query_template.format(symbol='SPY')
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ with open(f"json/stock-screener/data.json", 'rb') as file:
|
||||
stock_screener_data = orjson.loads(file.read())
|
||||
stock_screener_data_dict = {item['symbol']: item for item in stock_screener_data}
|
||||
|
||||
screener_columns = ['forwardPE','revenueTTM',"netIncomeTTM"]
|
||||
screener_columns = ['floatShares', 'forwardPE','shortOutStandingPercent','shortFloatPercent','revenuePerEmployee','profitPerEmployee','revenueTTM',"netIncomeTTM"]
|
||||
|
||||
async def get_data(ticker):
|
||||
try:
|
||||
@ -67,15 +67,18 @@ async def get_data(ticker):
|
||||
'beta': company_profile[0]['beta'],
|
||||
'marketCap': company_profile[0]['mktCap'],
|
||||
'avgVolume': company_profile[0]['volAvg'],
|
||||
'country': company_profile[0]['country'],
|
||||
'exchange': company_profile[0]['exchangeShortName'],
|
||||
'earning': company_quote['earningsAnnouncement'],
|
||||
'pe': company_quote['pe'],
|
||||
'eps': company_quote['eps'],
|
||||
'sharesOutstanding': company_quote['sharesOutstanding'],
|
||||
'score': score,
|
||||
'previousClose': company_quote['price'], #This is true because I update my db before the market opens hence the price will be the previousClose price.
|
||||
'website': company_profile[0]['website'],
|
||||
'description': company_profile[0]['description'],
|
||||
'fullTimeEmployees': company_profile[0]['fullTimeEmployees'],
|
||||
'stockSplits': company_stock_split,
|
||||
}
|
||||
|
||||
return res_list
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user