Skip to content
Market History

Historical stock market data API for US equities

stocks/us is the equity historical data behind every US-listed stock and ETF that trades on an exchange (OTC excluded): one-minute OHLCV bars from the US consolidated tape, every US exchange together, since January 2016. On 2026-11-10 it served 15,760 tickers. /api/v1/stats gives the live count and the first and last bar.

No key, the newest 100 daily bars of Apple:

Terminal window
curl https://getmarkethistory.com/api/v1/bars/stocks/us/AAPL/1d

With a key, two weeks of one-minute bars around Apple’s 2020 split, adjusted, as CSV:

Terminal window
curl "https://getmarkethistory.com/query/v1/bars/stocks/us/AAPL/1m?start=2020-08-24&end=2020-09-04&adjust=splits&format=csv" \
-H "Authorization: Bearer $MARKET_HISTORY_KEY"

From Python, with the client, paging handled for you:

from markethistory import Client
mh = Client() # reads MARKET_HISTORY_KEY
df = mh.frame(
"stocks/us", "AAPL", "1m", start="2024-01-01", end="2024-12-31", adjust="all"
)

Columns: timestamp (bar open, UTC), open, high, low, close, volume, vwap, trade_count, symbol, symbol_id. A minute with no trade has no bar; nothing is filled in.

Yes, two ways. With no account, the daily bars of any ticker: the newest 100 with no dates, or any range in the last two years with start and end (one such request every 30 seconds). Client().preview("stocks/us", "AAPL") does the same from Python. Signed in, a free account gets a monthly allowance of bars at 1h and longer over the full history; the amount is on pricing. One-minute bars need bought bars.

Yes. Inactive tickers stay in the dataset with their whole history, so a backtest over it is not limited to the companies that survived. Xilinx, acquired in February 2022, still answers:

Terminal window
curl https://getmarkethistory.com/api/v1/stocks/us/XLNX

That free call lists its one-minute bars from 2016-01-04 to 2022-02-11 and "status": "inactive". /api/v1/symbols?dataset=stocks/us&timeframe=1m lists every ticker with its first and last bar.

Are prices adjusted for splits and dividends?

Section titled “Are prices adjusted for splits and dividends?”

Bars are stored raw, as traded, and never rewritten. Add adjust=splits for split-adjusted prices, or adjust=all for splits and cash dividends (a total-return view). The splits, dividends, symbol changes and mergers themselves come from corporate actions, from 2016 on. To reproduce a backtest exactly, keep the raw bars and the actions you used: an adjusted history changes when a new split lands.

Any whole multiple of one minute: 1m, 5m, 1h, 1d, 1w, 1M. Bars hold the regular session, 09:30 to 16:00 New York, by default, so a 1d bar closes at the last regular-session trade; hours=extended adds pre-market, after-hours and overnight trading (Bars explains it; tz=UTC gives UTC days). One exchange’s own trades, IEX’s, also come as 1s bars (feed=iex), since May 2017.

A session day is published once it is at least 48 hours old, so the newest bar is one to two days behind. This is historical data for research and backtests, not a live feed.

One bar is one bar, in every format. A year of Apple at one minute was 187,812 bars in 2024, inside the smallest purchase (1M bars, $5). /api/v1/stocks/us/AAPL/cost?timeframe=1m&start=2024-01-01&end=2024-12-31 answers exactly what a pull bills before you make it, free. See Limits & billing.