hello guys, hope you're doing well. i used a code that plots renko and counts the bars by importing the data of stocks from yahoo finance and it worked great, but i want to use forex data from yahoo finance in the code but it is not working.
Stocklist=['AAPL']
start='2016-1-1'
for stock in StockList:
data[stock]=pdr.get_data_yahoo(stock, start)
that's how i get stocks data and use it, but its not working for forex, for example EURUSD=X
最佳答案
start_date = dt.datetime.today()- dt.timedelta(4000)
end_date = dt.datetime.today()
stock ="USDJPY=X"
data = yf.download(stock, start_date, end_date)
伙计们,它就是这样工作的
关于python - 如何导入外汇数据并使用 yfinance 和 pandas 数据阅读器读取它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72473338/