diff --git a/app/create_stock_db.py b/app/create_stock_db.py index 3cd2395..3483386 100755 --- a/app/create_stock_db.py +++ b/app/create_stock_db.py @@ -27,7 +27,7 @@ start_date = datetime(2015, 1, 1).strftime("%Y-%m-%d") end_date = datetime.today().strftime("%Y-%m-%d") - +quarter_date = '2024-6-30' if os.path.exists("backup_db/stocks.db"): @@ -114,7 +114,7 @@ async def save_fundamental_data(self, session, symbol): f"https://financialmodelingprep.com/api/v3/ratios/{symbol}?period=quarter&apikey={api_key}", f"https://financialmodelingprep.com/api/v3/historical-price-full/stock_split/{symbol}?apikey={api_key}", f"https://financialmodelingprep.com/api/v4/stock_peers?symbol={symbol}&apikey={api_key}", - f"https://financialmodelingprep.com/api/v4/institutional-ownership/institutional-holders/symbol-ownership-percent?date=2024-03-31&symbol={symbol}&page=0&apikey={api_key}", + f"https://financialmodelingprep.com/api/v4/institutional-ownership/institutional-holders/symbol-ownership-percent?date={quarter_date}&symbol={symbol}&page=0&apikey={api_key}", f"https://financialmodelingprep.com/api/v4/historical/shares_float?symbol={symbol}&apikey={api_key}", f"https://financialmodelingprep.com/api/v4/revenue-product-segmentation?symbol={symbol}&structure=flat&period=annual&apikey={api_key}", f"https://financialmodelingprep.com/api/v4/revenue-geographic-segmentation?symbol={symbol}&structure=flat&apikey={api_key}",