Get Historical Stock Prices
Retrieve historical daily stock price data for any publicly traded company. Each record includes the open, high, low, close, adjusted close, volume, VWAP (volume-weighted average price), and daily change metrics. Results are sorted by date in descending order by default.
Use the date_start and date_end parameters to filter to a specific date range, or set a limit to control how many trading days are returned. Add format=excel to get tab-separated values compatible with Google Sheets IMPORTDATA() and Excel.
https://api.roic.ai/v2/stock-prices/{identifier}curl "https://api.roic.ai/v2/stock-prices/AAPL?apikey=YOUR_API_KEY"[
{
"date": "2024-12-20",
"open": 254.77,
"high": 255.27,
"low": 248.68,
"close": 249.79,
"adj_close": 249.45,
"volume": 57620328,
"unadjusted_volume": 57620328,
"change": -4.98,
"change_percent": -1.954,
"vwap": 251.22,
"label": "December 20, 24"
}
]Parameters
Path parameters
identifierstringrequiredCompany identifier — supports ticker symbol (e.g., AAPL), CIK, CUSIP, or ISIN.
AAPLQuery parameters
limitnumberMaximum number of price records to return.
100date_startstringFilter results starting from this date (YYYY-MM-DD format).
2020-01-01date_endstringFilter results ending at this date (YYYY-MM-DD format).
2024-12-31orderstringSort order for time-series data.
DESCValues: ASCDESCformatstringResponse format. Use json for JSON (default) or excel for tab-separated values compatible with Google Sheets and Excel.
jsonValues: jsonexcelResponse
Response fields
datestringThe trading day the prices refer to, in YYYY-MM-DD format.
opennumberPrice of the first trade of the regular session, in the listing currency.
highnumberHighest price traded during the session.
lownumberLowest price traded during the session.
closenumberPrice of the last trade of the regular session. Not adjusted for splits or dividends that happened afterwards.
adj_closenumberClosing price retroactively adjusted for stock splits and dividends. Use this series for return calculations and long-horizon charts.
volumenumberTotal number of shares traded during the session, adjusted for later stock splits.
unadjusted_volumenumberNumber of shares traded during the session as originally reported, before any split adjustment.
changenumberAbsolute change of the closing price versus the previous trading day's close, in the listing currency. Negative on down days.
change_percentnumberPercentage change of the closing price versus the previous trading day's close, e.g. -1.954 for a 1.954% decline.
vwapnumberVolume-weighted average price of the session: total traded value divided by total volume. Commonly used as an execution benchmark.
labelstringPreformatted, human-readable version of the trading date, e.g. December 20, 24. Use it for display only; parse date instead.
Use Cases
- Stock price charts. Build candlestick or line charts using daily OHLCV data for any date range
- Trading strategy backtests. Download years of historical prices to test buy/sell signals against real market data
- Adjusted close analysis. Use the
adj_closefield for accurate long-term return calculations that account for stock splits and dividends - Spreadsheet imports. Use
format=excelwith Google SheetsIMPORTDATA()to pull price history directly into your financial models - Technical indicators. Compute moving averages, RSI, MACD, Bollinger Bands, and other indicators from daily OHLCV data
- Event studies. Analyze price action around earnings calls, FDA approvals, product launches, or macroeconomic events
- Volatility analysis. Calculate historical volatility, average true range, and other risk metrics from high/low/close data
Related Endpoints
- Latest Stock Price - Get the most recent trading day's price without a date range
- Income Statement - Pair price data with fundamental financial results
- Valuation Multiples - Get P/E, P/S, EV/EBITDA, and other valuation ratios alongside price data