Skip to content

Commit

Permalink
bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jan 1, 2025
1 parent e609d05 commit 169b78c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/cron_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -710,6 +711,8 @@ async def get_hottest_contracts():
'price': price,
'changesPercentage': changesPercentage,
'changeOI': change_oi,
'totalOI': total_oi,
'marketCap': market_cap,
})
except:
pass
Expand Down
2 changes: 2 additions & 0 deletions app/restart_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -938,6 +939,7 @@ async def get_stock_screener(con):
item['callVolume'] = None
item['putVolume'] = None
item['pcRatio'] = None
item['totalPrem'] = None


try:
Expand Down

0 comments on commit 169b78c

Please sign in to comment.