Yahoo Finance vs OHLC at a glance
| OHLC | Yahoo Finance | |
|---|---|---|
| Official API | Yes. Documented REST API with an OpenAPI spec, versioned under /v1. | No. Yahoo retired its finance APIs in 2017; today's access goes through undocumented endpoints such as query1.finance.yahoo.com. |
| Terms of use | Published per plan. Free and Developer are personal use; Pro allows internal business use; Commercial and Scale include display and redistribution. | Yahoo's terms forbid collecting data by automated means without permission and reusing it for any commercial purpose. yfinance describes itself as for research and educational use. |
| Reliability | Published limits per plan, keys you control, and RFC 9457 error documents with a stable type. | No published limits; 429 Too Many Requests errors and crumb or cookie requirements appear without notice, and libraries must be patched to keep working. |
| Data format | Exact decimal strings, YYYY-MM-DD dates, named fields per row, stable instrument_id. | Floating-point numbers, Unix timestamps at each session's open, parallel arrays. |
| Price | Free plan, then Developer $49, Pro $149, Commercial $899, Scale $1,499 per month. | Free to call. Yahoo's paid Bronze, Silver and Gold subscriptions do not include API access. |
| Coverage | Every U.S.-listed stock and ETF, plus mutual funds and U.S. corporate bonds on Commercial and Scale, and crypto and forex pairs, index levels and seven exchanges in Canada, the UK, France, the Netherlands and Australia on Pro and above. | Global stocks, ETFs, funds, indices, currencies and crypto as shown on the Yahoo Finance website. |
| Latency | End-of-day bars and quotes delayed at least 15 minutes; 5-minute and hourly bars for about the last 30 days on Pro and above. | Website quotes are real-time or delayed by exchange. |
| AI and MCP | Hosted MCP server at https://api.ohlc.io/mcp with OAuth sign-in or an API key, on Developer and above. | No official MCP server. |
Why developers move from yfinance to OHLC
- You are building something that has to keep working. A supported API with published limits does not change shape overnight or start returning 401 and 429 errors to unknown clients. Unofficial Yahoo endpoints have done both.
- You need the right to use the data. Yahoo's terms forbid automated collection without permission and any commercial reuse. OHLC's plans state what you may do, from personal projects to products your customers pay for.
- You want exact numbers. OHLC returns prices as decimal strings, so
187.44stays187.44; Yahoo's chart data comes back as floats such as222.77000427246094. - You want control over adjustment. OHLC returns as-traded prices by default and back-adjusts with
adjustment=splitoradjustment=total_return, from the same endpoint. - Backtests that survive ticker changes. Every listing has a stable
instrument_id, andas_ofandsymbol_atanswer what was known, and which company held a ticker, on any past date. Renamed, merged and reused symbols stop silently corrupting your history. - You want fundamentals and filings with a contract. Financial statements, dividends, splits, earnings and SEC filings are documented endpoints on every plan, including Free.
When Yahoo Finance is still fine
For looking at a chart by hand, a one-off personal download, or international listings, the Yahoo Finance website is free and covers markets worldwide. Once code depends on the data, or anyone else will see it, use an API you are licensed to call.
Moving from yfinance to OHLC
A typical yfinance script calls yf.download or Ticker.history. The OHLC equivalent is one HTTP request that returns named rows you can load straight into pandas.
- Daily bars.
yf.download("AAPL MSFT", start=…, end=…)maps to/v1/eod?symbols=XNAS:AAPL,XNAS:MSFT&from=…&to=…(daily bars). Note that OHLC'stodate is included in the range. - Adjusted prices. yfinance adjusts by default (
auto_adjust=True). Useadjustment=total_returnfor the same idea,adjustment=splitfor split-only, or leave it off for as-traded prices. - Dividends and splits.
Ticker.dividendsandTicker.splitsmap to /v1/dividends and /v1/splits. - Financials.
Ticker.income_stmt,balance_sheetandcashflowmap to /v1/financials/statements. - Quotes.
Ticker.fast_infoand quote lookups map to/v1/quotesor/v1/snapshot(snapshot), delayed at least 15 minutes. - Symbols.
AAPLbecomesXNAS:AAPL; bare U.S. tickers also resolve. Yahoo-style suffixes resolve too:VOD.LisXLON:VOD,RY.TOisXTSE:RYandBHP.AXisXASX:BHP(Pro and above). See symbols.
import os, requests, pandas as pd
r = requests.get(
"https://api.ohlc.io/v1/eod",
params={"symbols": "XNAS:AAPL,XNAS:MSFT", "from": "2024-01-02", "to": "2025-12-31", "adjustment": "total_return"},
headers={"Authorization": f"Bearer {os.environ['OHLC_API_KEY']}"},
)
df = pd.DataFrame(r.json()["data"])Follow meta.next_cursor for ranges longer than 500 rows (pagination), or see the Python guide. Create a free key to try it on AAPL, NVDA, JNJ, PEP, MSFT, SPY and QQQ, no card required.
Details about Yahoo Finance on this page come from Yahoo's terms of service, Yahoo help pages and the yfinance project as of October 4, 2026, and may change. Yahoo does not publish API documentation. OHLC details reflect our own pricing on the same date.