All comparisons

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.

yfinanceMarket History
What it isOpen-source Python library for Yahoo Finance's public endpoints; not affiliated with or endorsed by YahooHistorical market data API with keys, published prices, terms and a status page
Intended useResearch and educational purposes; its docs say the Yahoo Finance API is intended for personal use onlyInternal research, backtesting and operations; derived works (signals, charts, models) may be shared; raw redistribution needs a separate licence
Intraday historyIntraday cannot extend past the last 60 days; 1m covers about the last 8 days, 1h the last 730 days1-minute bars since 2016 from the consolidated tape (every US exchange), delisted tickers kept; 1-second bars from IEX since 2017
Bar sizes1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo1s, 1m, 1h or 1d stored, by market; any whole multiple (5m, 4h, 1w…) is resampled on read
Order bookNot in its API referenceUS stocks: every IEX order event (L3) and 1-second top of book (L2), since 2026-10-26
Rate limitsNone 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
PriceFree, Apache-2.0 licensedPay per bar returned: from $5 for 1M bars, bought bars never expire; monthly plans from $15
Free tierThe whole libraryThe 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 dataWebSocket live streamingNone: historical only, the newest bar is about a day old

When yfinance is the better choice

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.

Chart the free sampleQuickstartCoverage