Earlier, I can use the yfinance, however since the update, I cannot use it. Earlier, I used to revieve the historical datas using yfinance, however now it won't allow me to do so. I keep getting errors. Have you removed this function?
Simple code that reproduces your problem
import yfinance as yf
Define the forex pairs
forex_pairs = ['EURUSD=X', 'GBPUSD=X', 'USDJPY=X'] # Add more pairs as needed
Fetch the data for the specified forex pairs
forex_data = yf.download(forex_pairs, period='1mo') # You can change the period to '1d', '5d', '1y', etc.
Display the historical data
print(forex_data)
Debug log
(myenv) adnaansidd@Bot:~/realtime/bot$ python3 one.py
Traceback (most recent call last):
File "/home/adnaansidd/realtime/bot/one.py", line 7, in
forex_data = yf.download(forex_pairs, period='1mo') # You can change the period to '1d', '5d', '1y', etc.
AttributeError: module 'yfinance' has no attribute 'download'
Describe bug
Earlier, I can use the yfinance, however since the update, I cannot use it. Earlier, I used to revieve the historical datas using yfinance, however now it won't allow me to do so. I keep getting errors. Have you removed this function?
Simple code that reproduces your problem
import yfinance as yf
Define the forex pairs
forex_pairs = ['EURUSD=X', 'GBPUSD=X', 'USDJPY=X'] # Add more pairs as needed
Fetch the data for the specified forex pairs
forex_data = yf.download(forex_pairs, period='1mo') # You can change the period to '1d', '5d', '1y', etc.
Display the historical data
print(forex_data)
Debug log
(myenv) adnaansidd@Bot:~/realtime/bot$ python3 one.py Traceback (most recent call last): File "/home/adnaansidd/realtime/bot/one.py", line 7, in
forex_data = yf.download(forex_pairs, period='1mo') # You can change the period to '1d', '5d', '1y', etc.
AttributeError: module 'yfinance' has no attribute 'download'
Bad data proof
No response
yfinance
version0.2.48
Python version
Python 3.10.15
Operating system
Linux (ubuntu 20.04)