ranaroussi/yfinance
ranaroussi/yfinance has 25,880 GitHub stars and 3,491 forks. GitHot measured +74 in 7 days. Last checked 2026-11-10 01:24 UTC. Last push 2026-11-02.
从 Yahoo! Finance 的 API 下载市场数据
实测星标增长
- 24小时
- 更新延迟
- 7天
- +74
- 15天
- 更新延迟
- 1个月
- 更新延迟
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文

Download market data from Yahoo! Finance's API
yfinance offers a Pythonic way to fetch financial & market data from Yahoo!Ⓡ finance.
[!IMPORTANT]
Yahoo!, Y!Finance, and Yahoo! finance are registered trademarks of Yahoo, Inc.yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes.
You should refer to Yahoo!'s terms of use (here, here, and here) **for details on your rights to use the actual data downloaded.
Remember - the Yahoo! finance API is intended for personal use only.**
[!TIP] THE NEW DOCUMENTATION WEBSITE IS NOW LIVE! 🤘
Main components
Ticker: single ticker dataTickers: multiple tickers' datadownload: download market data for multiple tickersMarket: get information about a marketWebSocketandAsyncWebSocket: live streaming dataSearch: quotes and news from searchSectorandIndustry: sector and industry informationEquityQueryandScreener: build query to screen market
[!NOTE] Prices are default adjusted for dividends (
auto_adjust=True).
Installation
Install yfinance from PYPI using pip:
$ pip install yfinance
To install without curl_cffi for requests fallback, see Advanced ▸ Installation.
yfinance relies on the community to investigate bugs and contribute code. Here's how you can help.
Legal Stuff
yfinance is distributed under the Apache Software License. See the LICENSE.txt file in the release for details.
AGAIN - yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes. You should refer to Yahoo!'s terms of use (here, here, and here) for details on your rights to use the actual data downloaded.
P.S.
Please drop me a note with any feedback you have.
Ran Aroussi