Built into AlgoGP (data)Free
Market dataStocksETFsIndicesFuturesForexCrypto No key needed

Yahoo Finance API guide

Yahoo Finance has no official public API, but the chart endpoint behind its website is the most widely used free source of daily price history on the internet. It covers stocks worldwide, ETFs, indices, futures and currencies with no key, which makes it the default AlgoGP candle source for everything that is not crypto.

Last verified

Quick answer

Yahoo Finance has no official API; the unofficial chart endpoint (query1.finance.yahoo.com/v8/finance/chart) returns free, keyless daily and intraday history for stocks, ETFs, indices, futures, forex and crypto. It can throttle or change without notice and restricts commercial use, so cache results and use a keyed vendor for production.

Yahoo Finance API at a glance

Pricing
Free, no key (unofficial)
Availability
Worldwide (unofficial endpoint)
Paper trading
Not applicable (data only)
Integration type
Public, no key
In AlgoGP
Built in: data adapter (Free)
Endpoint
https://query1.finance.yahoo.com/v8/finance/chart/{symbol}
Symbols
AAPL, 7203.T, ^GSPC, GC=F, EURUSD=X, BTC-USD
History
Decades of daily bars; 1h for ~730 days; 1m for ~30 days
Status
Unofficial: no SLA, can throttle or change

How the chart endpoint works

Request /v8/finance/chart/AAPL?interval=1d&period1={unix}&period2={unix} (or range=5y). The response holds a timestamp array and an indicators.quote[0] object with parallel open, high, low, close and volume arrays, plus indicators.adjclose for dividend- and split-adjusted closes.

IntervalHow far back
1mAbout the last 30 days, 7 days per request
5m, 15m, 30mAbout the last 60 days
60m / 1hAbout the last 730 days
1d, 1wk, 1moThe full listing history

Yahoo symbol spelling

  • US stocks and ETFs: the plain ticker, with a dash for share classes (BRK-B).
  • Other exchanges: a suffix (7203.T Tokyo, VOD.L London, SAP.DE Xetra).
  • Indices start with a caret (^GSPC, ^NDX, ^VIX).
  • Continuous front-month futures end in =F (ES=F, CL=F, GC=F).
  • Currencies end in =X (EURUSD=X, JPY=X); crypto uses a dash (BTC-USD).

Risks of an unofficial API

Daily bars are stamped at the session open, so a strategy should only act on a bar after its session has closed. AlgoGP’s in-app engine releases each Yahoo bar one interval after its open for exactly this reason.

Use Yahoo Finance in AlgoGP

Open a project, go to the APIs & keys tab and, under Platforms, pick Yahoo Finance as the market data source (market_data.py). The choice is saved to config.json as a new strategy version:

{
  "platforms": {
    "data": "yahoo-finance",
    "broker": "alpaca"
  }
}
In-app backtests always use AlgoGP’s normalized history so results stay comparable; this choice decides what backtest.py and live.py connect to when you run the exported code.

Yahoo Finance needs no API key: the generated code calls its public endpoints directly.

Yahoo Finance API: frequently asked questions

Is there an official Yahoo Finance API?

No. Yahoo closed its official API in 2017. The chart endpoint used here is the one the website calls; it is free but unsupported.

Does Yahoo Finance data include dividends?

Yes. adjclose reinvests dividends and adjusts for splits, and events=div,splits returns the corporate actions themselves.

Why is my Yahoo request returning 429?

Too many requests from one IP. Slow down, cache responses and retry with backoff.

Turn Yahoo Finance data into a tested strategy

Backtest an idea in the browser, then export Python whose live loop reads candles straight from Yahoo Finance with your own key.

  • Generated Yahoo Finance candle fetcher, closed bars only
  • An AI copilot that writes and revises the rules
  • Pair it with Alpaca, Binance, OANDA or another broker

Free plan, no card required.

Yahoo Finance alternatives

Independent guide. AlgoGP is not affiliated with Yahoo Finance. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.