tickerbot_get_bars
Fetch OHLCV price bars from 1-second to monthly intervals for one ticker or up to 50 symbols, enabling historical price analysis, charting, and signal backtesting.
Instructions
Returns OHLCV bars from 1s to monthly for one ticker or a comma list of up to 50 in the path, such as a screen's matches.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ticker": "<ticker>",
"interval": "<interval>"
},
"name": "tickerbot_get_bars"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Window end: `YYYY-MM-DD`, ISO timestamp or epoch milliseconds (11 to 13 digits). A bare date covers that whole day. A timestamp is included until 2027-01-12 (the newest bar returned is at or before it) and exclusive from then, as everywhere else (Deprecations). On sub-daily intervals a bare date on `from` or `to` is the ET calendar day for stocks and ETFs (the whole 04:00-20:00 ET session) and the UTC day for crypto, FX and rates. Mutually exclusive with `asof` (400). See Time windows. | |
| asof | No | Point-in-time: the most recent bar whose period had closed at or before that moment. A bare `YYYY-MM-DD` means that day's close. A full timestamp means the last finished bar: at 10:00 ET on a Wednesday the day's close has not happened, so `1d` returns Tuesday's bar. A bare date on an intraday grid (`1m`, `1h`, …) is accepted and means the last bar of that day: the ET calendar day for stocks and ETFs (through the 19:59 ET bar), the UTC day for crypto, FX and rates. Returns one bar unless you also pass `limit`, which gives the last `limit` closed bars; follow `next_cursor` with the same parameters to keep paging back: the cursor and `asof` both bound the page, so no bar after the instant is ever served and every page stays on the company that held the symbol at the instant. Unlimited depth. Response time: under 1.5 s cold, under 0.6 s warm. | |
| from | No | Window start: `YYYY-MM-DD`, ISO timestamp or epoch milliseconds (11 to 13 digits). A bare date starts at the beginning of that day; a timestamp is included. Combines with `to` for an explicit window; page within it using `cursor`. Mutually exclusive with `asof` (400). See Time windows. | |
| limit | No | Most-recent N bars. Max 1000; an over-cap value is clamped, not an error. On a comma list the cap is per symbol: each symbol returns its newest `limit` bars in the window. | |
| cursor | No | Continue paging back: the previous response's `next_cursor`, unchanged, with the same parameters. On a comma list, `next_cursor` is an object of each symbol's oldest-bar time; to page one symbol further, send its value as `cursor` with that symbol alone. From 2027-01-12 a comma list's `next_cursor` is one opaque string to pass back as `cursor` with the same symbols (Deprecations). A blank `cursor=` counts as absent. | |
| ticker | Yes | One symbol, or a comma-separated list of up to 50 for a response keyed by symbol. Case-insensitive. Equities are bare symbols (`NVDA`); every other class carries a prefix: rates (`R:SOFR`), crypto (`X:BTCUSD`), fx (`X:EURUSD`). Bare `BTC`/`ETH` are US-listed ETFs, not spot crypto. See Tickers. | |
| session | No | Sub-hour intervals only. `all` (default) includes pre- and post-market bars. `regular` keeps bars whose start is in 09:30–16:00 ET (DST-aware), or 09:30–13:00 ET on NYSE half days. Why you might want it: the vendor buckets trades by SIP report time, and late-reported off-exchange (Form T) prints on thin names can land 20 min to hours late in a pre-market minute (a `$1.70` print at 08:13 ET on a `$3.85` stock). Daily high/low are untouched by those. `limit` counts after the filter; paging still works. Values: all: All sessions. Pre-market, regular and after-hours bars. regular: Regular session. Bars that start between 09:30 and 16:00 ET, or 09:30 and 13:00 ET on NYSE half days. | all |
| adjusted | No | Default `true`: prices are split-adjusted (restated after each later split, as the tape is), so a series is continuous across a split. `false` returns the price as it printed that day (a name that later did a 1:10 reverse split reads `21.4` adjusted and `2.14` on the tape), which is what a broker fill or a chart from that time shows. Volume scales the other way. | |
| interval | Yes | Bar interval. `2h`/`4h` roll up hourly bars; `1w`/`1mo` roll up daily bars into calendar weeks (Monday start) and months; the bar's `t` is the bucket start (UTC), and with `asof` the last bucket is the week/month to date. Values: 1s: 1 second. The finest bars served. 1m: 1 minute. Minute bars, the bars the 5, 15 and 30 minute widths roll up from. 5m: 5 minutes. Minute bars rolled up into 5-minute buckets. 15m: 15 minutes. Minute bars rolled up into 15-minute buckets. 30m: 30 minutes. Minute bars rolled up into 30-minute buckets. 1h: 1 hour. Hourly bars. 2h: 2 hours. Hourly bars rolled up into 2-hour buckets aligned to midnight UTC. 4h: 4 hours. Hourly bars rolled up into 4-hour buckets aligned to midnight UTC. 1d: 1 day. Daily bars, one per session. 1w: 1 week. Daily bars rolled up into calendar weeks starting Monday; `t` is the week’s start (UTC). With `asof`, the last bar is the week to date. 1mo: 1 month. Daily bars rolled up into calendar months; `t` is the month’s start (UTC). With `asof`, the last bar is the month to date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | Yes | OHLCV bars, oldest first: for one symbol, an array of bars; for a comma list, an object keyed by symbol. Each bar is `t` (when the bar starts, as epoch milliseconds, so a chart library can plot it as is: one of two times in the data that are not ISO 8601, with History's fiscal label at `1q`/`1y`), `o` (open), `h` (high), `l` (low), `c` (close), `v` (volume), `vw` (volume-weighted average price) and `n` (number of trades). A rolled-up bar (`5m` to `30m`, `2h`, `4h`, `1w`, `1mo`) sums `v` and `n` and weights `vw` by volume. `vw` and `n` are `null` where the trades behind a bar were not recorded. | |
| note | No | Present only when there is something to disclose about how the page was served: the first request for a symbol at a sub-hour interval loads and stores its bars, so that one call is slower than later ones and the note says so. Bulk responses carry `notes[symbol]` instead. | |
| _meta | No | Shared keys only: on every read `history_revised_at`, per symbol, the last time its stored history was rewritten; when a rename or an earlier holder affects the dates, `identity`, per symbol, whose bars these are, with `traded_as` listing the symbols a renamed company used. See the `_meta` reference. | |
| as_of | Yes | Server time this response was assembled (ISO 8601); on an as-of read, the instant you asked for (As-of). | |
| count | Yes | The bars in `bars` for one symbol. On a comma list, the symbols asked for (unknown ones included) until 2027-01-12; from then the bars returned across the symbols (Deprecations). | |
| notes | No | With a comma list only: the per-symbol disclosures, keyed by symbol, in place of `note`. | |
| query | Yes | Your request echoed, each param with its effective value: `ticker` (a list even for one symbol), `interval`, `from`, `to`, `asof`, `adjusted`, `session` and `limit`. | |
| coverage | Yes | `covered` when bars were found, `no_data` when nothing exists for the symbol in the window (before its first session, a market holiday, a thin name with no prints, or a symbol an earlier page already finished). A comma list keys it by symbol. A page that could not be completed is never a 200: it is a `503 unavailable` with `Retry-After`. | |
| not_found | No | With a comma list only: the requested symbols we do not track, in request order; an empty array when every symbol was found; every symbol when none was (still a 200). Until 2027-01-12 each also keeps an empty entry in `bars`, `coverage` and the `next_cursor` map; from then it is listed here only, and the opaque `next_cursor` carries no position for it. | |
| _advisories | No | Present only when the response carried a warning: `deprecated` (since, sunset_on, successor, warning; on a deprecated tool, successor names the tool to call), `rate_limit` (warning, retry_after_seconds, limit, remaining, reset_epoch_s) or `monthly_quota` (warning, limit, remaining, reset_epoch_s). | |
| next_cursor | No | The next page. For one symbol, the oldest bar's `t` as a string, `null` once nothing older remains; pass it back as `cursor`. For a comma list, an object of each symbol's oldest-bar time (`null` = finished); to page one symbol further, send its value as `cursor` with that symbol alone. From 2027-01-12 a comma list's `next_cursor` is one opaque string to pass back as `cursor` (Deprecations). |