From d10a889e9bb03a72646d36c960ed543c034d99c0 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Mon, 11 Nov 2024 09:37:17 -0800 Subject: [PATCH] Convert today's date to a date object rather than a string --- daily_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daily_data.py b/daily_data.py index 1f0b4e3..ff37c2f 100644 --- a/daily_data.py +++ b/daily_data.py @@ -11,7 +11,7 @@ def get_daily_data(symbol: str, start_date: datetime = datetime.today() - timede The daily bar is not available for the current day until after market close. It must be calculated using intraday (e.g., 5-minute) bars while the market is open. """ - today = datetime.today().strftime('%Y-%m-%d') + today = datetime.today().date() if today not in daily_data['Date'].values: intraday_data = ohlc(symbol = symbol, minutes = 5)