diff --git a/app/cron_list.py b/app/cron_list.py index 04d51cc..463cbda 100644 --- a/app/cron_list.py +++ b/app/cron_list.py @@ -692,8 +692,9 @@ async def get_hottest_contracts(): for symbol in symbols: try: # Load quote data from JSON file - change_oi = stock_screener_data_dict[symbol].get('changeOI',None) - if change_oi > 0: + change_oi = stock_screener_data_dict[symbol].get('changeOI',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) # Assign price and volume, and check if they meet the penny stock criteria if quote_data: @@ -710,6 +711,8 @@ async def get_hottest_contracts(): 'price': price, 'changesPercentage': changesPercentage, 'changeOI': change_oi, + 'totalOI': total_oi, + 'marketCap': market_cap, }) except: pass diff --git a/app/restart_json.py b/app/restart_json.py index e3e52b1..77f6ed4 100755 --- a/app/restart_json.py +++ b/app/restart_json.py @@ -927,6 +927,7 @@ async def get_stock_screener(con): item['callVolume'] = res['call_volume'] item['putVolume'] = res['put_volume'] item['pcRatio'] = res['put_call_ratio'] + item['totalPrem'] = res['call_premium']+res['put_premium'] except: item['gexRatio'] = None item['ivRank'] = None @@ -938,6 +939,7 @@ async def get_stock_screener(con): item['callVolume'] = None item['putVolume'] = None item['pcRatio'] = None + item['totalPrem'] = None try: