⇄ConnectorFinanceFree
yfinance — Yahoo Finance Market Data Connector
The most popular open-source Yahoo Finance connector — historical prices, fundamentals, options chains, and real-time quotes as pandas DataFrames.
yfinance — Yahoo Finance Market Data Connector
yfinance is the de-facto open-source connector for Yahoo Finance data, providing easy access to OHLCV price history, dividends, splits, fundamental data (balance sheet, income statement, cash flow), options chains, analyst ratings, and real-time quotes — all as pandas DataFrames.
Key Features
- Historical OHLCV data for equities, ETFs, indices, forex, crypto, futures
- Fundamental data: financials, balance sheet, cash flow, earnings calendar
- Options chain data (calls and puts)
- Real-time quotes and news headlines
- Batch download for multiple tickers in one call
- Proxy support and rate-limit friendly
Quick Start
import yfinance as yf
# Single ticker
msft = yf.Ticker("MSFT")
print(msft.history(period="1y").tail())
print(msft.info["trailingPE"])
# Batch download
df = yf.download(["AAPL","GOOG","AMZN"], start="2023-01-01", end="2024-12-31")
print(df["Close"])
npx ai-supply add yfinance-market-data-connector
Curated mirror of the open-source yfinance (Apache-2.0). Get it from the source.