update statistics
This commit is contained in:
parent
8746e1ff42
commit
6c98286753
@ -29,7 +29,10 @@ async def get_data(symbol):
|
||||
'change1Y','sma50','sma200','rsi','avgVolume','revenue','netIncome','grossProfit','operatingIncome','ebitda','ebit','eps',
|
||||
'cashAndCashEquivalents','totalDebt','retainedEarnings','totalAssets','workingCapital','operatingCashFlow',
|
||||
'capitalExpenditure','freeCashFlow','freeCashFlowPerShare','grossProfitMargin','operatingProfitMargin','pretaxProfitMargin',
|
||||
'netProfitMargin','ebitdaMargin','ebitMargin','freeCashFlowMargin','failToDeliver','relativeFTD']
|
||||
'netProfitMargin','ebitdaMargin','ebitMargin','freeCashFlowMargin','failToDeliver','relativeFTD',
|
||||
'annualDividend','dividendYield','payoutRatio','dividendGrowth','earningsYield','freeCashFlowYield','altmanZScore','piotroskiScore',
|
||||
'lastStockSplit','splitType','splitRatio','analystRating','analystCounter','priceTarget','upside'
|
||||
]
|
||||
|
||||
if symbol in stock_screener_data_dict:
|
||||
result = {}
|
||||
|
||||
@ -576,6 +576,18 @@ async def get_stock_screener(con):
|
||||
item['sector'] = None
|
||||
item['industry'] = None
|
||||
|
||||
try:
|
||||
with open(f"json/stockdeck/{symbol}.json", 'r') as file:
|
||||
res = orjson.loads(file.read())
|
||||
data = res['stockSplits'][0]
|
||||
item['lastStockSplit'] = data['label']
|
||||
item['splitType'] = 'forward' if data['numerator'] > data['denominator'] else 'backward'
|
||||
item['splitRatio'] = f"{data['numerator']}"+":"+f"{data['denominator']}"
|
||||
except:
|
||||
item['lastStockSplit'] = None
|
||||
item['splitType'] = None
|
||||
item['splitRatio'] = None
|
||||
|
||||
#Financial Statements
|
||||
item.update(get_financial_statements(item, symbol))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user