bugfixing
This commit is contained in:
parent
e609d05159
commit
169b78c3cf
@ -692,8 +692,9 @@ async def get_hottest_contracts():
|
|||||||
for symbol in symbols:
|
for symbol in symbols:
|
||||||
try:
|
try:
|
||||||
# Load quote data from JSON file
|
# Load quote data from JSON file
|
||||||
change_oi = stock_screener_data_dict[symbol].get('changeOI',None)
|
change_oi = stock_screener_data_dict[symbol].get('changeOI',0)
|
||||||
if change_oi > 0:
|
total_oi = stock_screener_data_dict[symbol].get('totalOI',0)
|
||||||
|
if change_oi > 0 and total_oi > 0:
|
||||||
quote_data = await get_quote_data(symbol)
|
quote_data = await get_quote_data(symbol)
|
||||||
# Assign price and volume, and check if they meet the penny stock criteria
|
# Assign price and volume, and check if they meet the penny stock criteria
|
||||||
if quote_data:
|
if quote_data:
|
||||||
@ -710,6 +711,8 @@ async def get_hottest_contracts():
|
|||||||
'price': price,
|
'price': price,
|
||||||
'changesPercentage': changesPercentage,
|
'changesPercentage': changesPercentage,
|
||||||
'changeOI': change_oi,
|
'changeOI': change_oi,
|
||||||
|
'totalOI': total_oi,
|
||||||
|
'marketCap': market_cap,
|
||||||
})
|
})
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -927,6 +927,7 @@ async def get_stock_screener(con):
|
|||||||
item['callVolume'] = res['call_volume']
|
item['callVolume'] = res['call_volume']
|
||||||
item['putVolume'] = res['put_volume']
|
item['putVolume'] = res['put_volume']
|
||||||
item['pcRatio'] = res['put_call_ratio']
|
item['pcRatio'] = res['put_call_ratio']
|
||||||
|
item['totalPrem'] = res['call_premium']+res['put_premium']
|
||||||
except:
|
except:
|
||||||
item['gexRatio'] = None
|
item['gexRatio'] = None
|
||||||
item['ivRank'] = None
|
item['ivRank'] = None
|
||||||
@ -938,6 +939,7 @@ async def get_stock_screener(con):
|
|||||||
item['callVolume'] = None
|
item['callVolume'] = None
|
||||||
item['putVolume'] = None
|
item['putVolume'] = None
|
||||||
item['pcRatio'] = None
|
item['pcRatio'] = None
|
||||||
|
item['totalPrem'] = None
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user