From c4990daaaae04f644e883d89aa602274f08d3197 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 2 Jan 2025 00:39:10 +0100 Subject: [PATCH] bugfixing --- app/cron_list.py | 6 +++--- app/main.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/cron_list.py b/app/cron_list.py index 463cbda..ab1b649 100644 --- a/app/cron_list.py +++ b/app/cron_list.py @@ -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") @@ -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(): @@ -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(), ) diff --git a/app/main.py b/app/main.py index b2f9872..b096664 100755 --- a/app/main.py +++ b/app/main.py @@ -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'