Market History vs yfinance
For researchers and developers moving off yfinance: its intraday bars stop at the last 60 days, it rests on Yahoo's public endpoints with no published rate limits, and its own docs say it is meant for research and education. Market History is a keyed historical data API with years of intraday bars and written terms.
yfinance's side is taken from its own public pages as of November 2026; check them for changes since. Market History's side is read live from the API.
| yfinance | Market History | |
|---|---|---|
| What it is | Open-source Python library for Yahoo Finance's public endpoints; not affiliated with or endorsed by Yahoo | Historical market data API with keys, published prices, terms and a status page |
| Intended use | Research and educational purposes; its docs say the Yahoo Finance API is intended for personal use only | Internal research, backtesting and operations; derived works (signals, charts, models) may be shared; raw redistribution needs a separate licence |
| Intraday history | Intraday cannot extend past the last 60 days; 1m covers about the last 8 days, 1h the last 730 days | 1-minute bars since 2016 from the consolidated tape (every US exchange), delisted tickers kept; 1-second bars from IEX since 2017 |
| Bar sizes | 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo | 1s, 1m, 1h or 1d stored, by market; any whole multiple (5m, 4h, 1w…) is resampled on read |
| Order book | Not in its API reference | US stocks: every IEX order event (L3) and 1-second top of book (L2), since 2026-10-26 |
| Rate limits | None published; the library raises YFRateLimitError (“Too Many Requests”) | 300 requests a minute per account; a few billed requests a minute while an account holds only free bars |
| Price | Free, Apache-2.0 licensed | Pay per bar returned: from $5 for 1M bars, bought bars never expire; monthly plans from $15 |
| Free tier | The whole library | The newest 100 daily bars of any ticker with no key; a free account adds 250,000 bars a month at 1h and longer over the full history |
| Live data | WebSocket live streaming | None: historical only, the newest bar is about a day old |
When yfinance is the better choice
- You want something free with no account, for a quick look at recent prices.
- You need fundamentals, analyst estimates, holders or SEC filings: yfinance exposes them, Market History does not.
- You need live streaming quotes; Market History is historical only.
- You only need daily bars or the last few weeks of intraday data, and personal use is all you plan.
The same request in both
yfinance:
import yfinance as yf
# 1-minute bars: about the last 8 days at most
df = yf.download("MSFT", period="5d", interval="1m")Market History, with the Python client, installed from the site (it is not on PyPI):
pip install "markethistory[pandas,arrow] @ https://getmarkethistory.com/py/markethistory-0.12.8-py3-none-any.whl"
from markethistory import Client # set MARKET_HISTORY_KEY first
mh = Client()
# 1-minute bars, years back
df = mh.frame("stocks/us", "MSFT", "1m", start="2020-01-01")Try it
The newest 100 daily bars of any ticker are free with no key, and a free account adds250,000 bars a month at 1h and longer.