雅虎!金融市场数据下载器
yfinance-ez的Python项目详细描述
雅虎!金融市场数据下载器
自从Yahoo! finance退役以来 他们的历史数据API,许多依赖它停止工作的程序。在
yfinance_ez旨在通过提供可靠的、线程化的, 从雅虎下载历史市场数据的Pythonic方式!金融。在
注
以斯拉的话:
这个库最初是由ranaroussi创建的,名为yfinance。我遇到了 一些虫子在用它,但没能联系到他更新他的包,所以我 现在把它改名为yfinance ez,这样我就可以处理它了。我做了一些重组 并添加了改进的文档,但大部分代码的功劳不是我的。在
快速入门
Ticker模块,它允许您访问 股票数据以一种神秘的方式:
importyfinance_ezasyfmsft=yf.Ticker("MSFT")# get stock infomsft.info# get historical market data for the last quarter# This method also accepts start and end dates and/or time intervals# so you can customize what you're looking for.hist=msft.get_history(period=yf.TimePeriods.Quarter)# show actions (dividends, splits) for the last retrieved historical periodmsft.actions# show dividends for the last retrieved historical periodmsft.dividends# show splits for the last retrieved historical periodmsft.splits# show financialsmsft.financialsmsft.quarterly_financials# show major holdersmsft.major_holders# show institutional holdersmsft.institutional_holders# show balance heetmsft.balance_sheetmsft.quarterly_balance_sheet# show cashflowmsft.cashflowmsft.quarterly_cashflow# show earningsmsft.earningsmsft.quarterly_earnings# show sustainabilitymsft.sustainability# show analysts recommendationsmsft.recommendations# show next event (earnings, etc)msft.calendar# get option chain for specific expirationopt=msft.option_chain('YYYY-MM-DD')# data available via: opt.calls, opt.puts
如果要使用代理服务器下载数据,请使用:
^{pr2}$安装
使用pip安装yfinance_ez:
$ pip install yfinance_ez
法律事务
yfinance_ez在Apache软件许可证下分发。有关详细信息,请参阅发行版中的LICENSE.txt文件。在
P、 S.
请给我写张便条,上面有你的任何反馈。在
Ezra Schiff
- 项目
标签: