finance.yahoo.com
Get Historical Prices
Input
range requiredMatches the site's own chart range buttons (1D/5D/1M/6M/YTD/1Y/5Y/All, plus a few extra Yahoo also accepts).
symbol requiredSingle Yahoo Finance ticker symbol, e.g. AAPL, BTC-USD, CL=F, ^VIX. The chart endpoint is single-symbol only.
interval requiredCandle granularity. Fine intervals (e.g. 1m) are only available for short ranges — Yahoo enforces this server-side and the script surfaces its error verbatim on a mismatch.
Output
range requiredsymbol requiredcandles requiredinterval requiredcurrency optionaltimezone optionalgmtoffset optionalexchangeName optionalinstrumentType optional