bugfixing
This commit is contained in:
parent
169b78c3cf
commit
c4990daaaa
@ -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(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user