OHLCV
Price bars for one asset, a page at a time
OHLCV returns open, high, low, close and volume bars for one stock, ETF or crypto asset, daily or weekly. Use it when you need exact prices: returns, charts, or a backtest's fills. For what those prices mean (trend, momentum, levels), use Summary.
It costs 1 credit per 100 bars returned, rounded up, and at least 1.
Parameters
| Parameter | Default | Description |
|---|---|---|
ticker | — | Required, in the path: AAPL, SPY, BTCUSD. Not case-sensitive |
timeframe | daily | daily or weekly. See Weekly bars |
start, end | your plan's history | Inclusive dates, YYYY-MM-DD, matched against each bar's date |
order | desc | desc (newest first) or asc |
limit | 100 | Bars per page, up to 1000 |
cursor | — | The previous page's next_cursor. See Pagination |
adjustment | split | split, split_dividend or raw. See Price adjustment |
How far back you can read depends on your plan; each response gives your first readable date as history_start. Delisted assets keep their history, so a backtest isn't limited to today's survivors. A ticker symbol that has been reused returns its current holder.
Price adjustment
| Mode | Prices | Volume |
|---|---|---|
split | Every split and reverse split applied, so all prices are on today's share basis. Dividends are not included | Split-adjusted |
split_dividend | Split basis with cash dividends reinvested: a total-return series. For each dividend, every earlier price is multiplied by 1 − dividend / prior close | Split-adjusted |
raw | As traded on the day | As traded |
split and split_dividend are on today's basis, so their past prices change when a new split or dividend happens. raw prices stay as traded. Crypto has no splits or dividends, so all three modes return the same bars. The response's adjustment says which mode was used.
Weekly bars
A weekly bar covers Monday to Sunday and is dated by the Sunday, matching Summary's weekly rows. The current week appears only once it has ended. A weekly bar needs its whole week inside your plan's history, so the first weekly bar can start up to a week after history_start.
Pagination
When has_more is true, send the same request again with cursor set to next_cursor. Pages don't overlap. Keep order the same across pages.
Response fields
| Field | Type | Description |
|---|---|---|
ticker, asset_class | string | The asset and its class: stock, etf or crypto |
currency | string | null | The price currency |
timeframe, adjustment, order | string | What was applied |
start, end | string | null | The dates read. start is your start, or history_start when you didn't send one; on weekly, the Monday of that week |
row_count | integer | Bars on this page |
has_more, next_cursor | boolean, string | null | Whether there's another page, and the cursor to get it |
bars | object[] | The bars, each with date, open, high, low, close and volume. Only close is always present; the others can be null |
history_start, plan | string | Your plan's first readable date, and your plan |
A valid ticker with no bars in the range returns 200 with an empty bars list.
Errors
| Status | error.type | Cause | What to do |
|---|---|---|---|
400 | invalid_parameter | An unknown parameter, a malformed date, start after end, a limit over 1000, or an unknown adjustment. | Read the message: it names the problem. |
403 | tier_restricted | start or cursor is before your plan's first readable date. | Start at history_start or later, or upgrade at the upgrade_url in the response. |
404 | ticker_not_found | The symbol doesn't exist. | Check the symbol, or find it with Search. |
Errors aren't charged. Authentication and rate-limit errors are on Authentication and Errors & Caching.