fix: Correct indentation error in get_stock_data function

This commit is contained in:
Bobby Abellana (aider) 2025-02-07 08:53:56 -08:00 committed by Bobby Abellana
parent 8573399f9d
commit b67586116c
No known key found for this signature in database
GPG Key ID: 647714CC45F3647B

View File

@ -87,15 +87,15 @@ def get_stock_data(ticker: str, start_date: datetime, end_date: datetime, interv
print("\nExecuting Query:")
print(query) # Debugging: Print the query to verify its correctness
result = client.query(query)
if not result.result_rows:
print(f"No data found for {ticker}")
return pd.DataFrame()
df = pd.DataFrame(
result.result_rows,
columns=['date', 'open', 'high', 'low', 'close', 'volume']
)
result = client.query(query)
if not result.result_rows:
print(f"No data found for {ticker}")
return pd.DataFrame()
df = pd.DataFrame(
result.result_rows,
columns=['date', 'open', 'high', 'low', 'close', 'volume']
)
if interval != "daily" and interval != "5min":
# Resample to desired interval