雅虎!金融市场数据下载器

yfinance-ez的Python项目详细描述


雅虎!金融市场数据下载器

Python versionPyPi versionPyPi statusPyPi downloadsTravis-CI build statusCodeFactorStar this repoFollow me on twitter

自从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

要求

P、 S.

请给我写张便条,上面有你的任何反馈。在

Ezra Schiff

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java JavaFX触控事件未触发Ubuntu 20.04触控笔记本电脑   java如何在AWT中关闭窗口?   java Dagger 2:注入具有构造函数参数的成员   创建对象的Java调用类   对象我想在A.java中添加两个数字,并在B.java中打印结果(如何?)   java如何使用AWS SDK for Android从数字海洋空间下载图像?   java Facebook sdk 4.0.1无法使用Android studio获取某些字段   4分钟后web应用程序(Angular 8和Rest API)中的java自动会话超时   在Eclipse for Java EE developers edition中禁用HTML警告   java按字母顺序排列字符串我错过了什么明显的东西吗?   java在Jshell中println和printf有什么不同