Skip to content

Commit

Permalink
Merge pull request #308 from rawmean/main
Browse files Browse the repository at this point in the history
fixed get_historical_stock_prices
  • Loading branch information
ashpreetbedi committed May 20, 2024
2 parents 2a6fd89 + f7add9f commit 5ccbfb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phi/tools/yfinance.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_historical_stock_prices(self, symbol: str, period: str = "1mo", interval
"""
try:
stock = yf.Ticker(symbol)
historical_price = stock.history(period="1d")
historical_price = stock.history(period=period, interval=interval)
return historical_price.to_json(orient="index")
except Exception as e:
return f"Error fetching historical prices for {symbol}: {e}"
Expand Down

0 comments on commit 5ccbfb4

Please sign in to comment.