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 169b78c commit c4990da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/cron_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ async def get_most_shorted_stocks():
file.write(orjson.dumps(res_list))


async def get_hottest_contracts():
async def get_highest_oi_change():
with sqlite3.connect('stocks.db') as con:
cursor = con.cursor()
cursor.execute("PRAGMA journal_mode = wal")
Expand Down Expand Up @@ -726,7 +726,7 @@ async def get_hottest_contracts():
item['rank'] = rank

# Write the filtered and ranked penny stocks to a JSON file
with open("json/stocks-list/list/hottest-contracts.json", 'wb') as file:
with open("json/stocks-list/list/highest-open-interest-change.json", 'wb') as file:
file.write(orjson.dumps(res_list))

async def etf_bitcoin_list():
Expand Down Expand Up @@ -963,7 +963,7 @@ async def run():
get_most_employees(),
get_most_ftd_shares(),
get_most_shorted_stocks(),
get_hottest_contracts(),
get_highest_oi_change(),
)


Expand Down
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4033,7 +4033,7 @@ async def get_statistics(data: FilterStockList, api_key: str = Security(get_api_
category_type = 'sector'
elif filter_list == 'reits':
category_type = 'industry'
elif filter_list in ['hottest-contracts','most-shorted-stocks','most-ftd-shares','highest-income-tax','most-employees','highest-revenue','top-rated-dividend-stocks','penny-stocks','overbought-stocks','oversold-stocks','faang','magnificent-seven','ca','cn','de','gb','il','in','jp','nyse','nasdaq','amex','dowjones','sp500','nasdaq100','all-stock-tickers']:
elif filter_list in ['highest-open-interest-change','most-shorted-stocks','most-ftd-shares','highest-income-tax','most-employees','highest-revenue','top-rated-dividend-stocks','penny-stocks','overbought-stocks','oversold-stocks','faang','magnificent-seven','ca','cn','de','gb','il','in','jp','nyse','nasdaq','amex','dowjones','sp500','nasdaq100','all-stock-tickers']:
category_type = 'stocks-list'
elif filter_list in ['dividend-kings','dividend-aristocrats']:
category_type = 'dividends'
Expand Down

0 comments on commit c4990da

Please sign in to comment.