Get bars in a date range
get_bars_rangeRetrieve OHLCV bars for a symbol and timeframe over a specified UTC interval, ordered oldest first. Use inclusive start and exclusive end bounds to tile ranges without overlapping or missing bars.
Instructions
Return the OHLCV bars whose open time falls in [start, end), oldest first.
Both bounds must carry a UTC offset, for example 2026-06-01T08:00:00Z. start is
inclusive and end is exclusive, so consecutive ranges tile without repeating a
bar. The number of bars the range spans is capped by the same limit that applies to
get_bars, so a wide window at a fine timeframe returns a tool error asking for a
coarser one rather than a truncated answer. Unlike get_bars, an end that reaches
into the interval currently forming can return that bar, because the bounds are
yours; stop end at a closed interval if that matters. On the replay source the
prices are generated, not recorded from any market.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Exclusive, ISO 8601, UTC. | |
| start | Yes | Inclusive, ISO 8601, UTC. | |
| symbol | Yes | Instrument name exactly as list_symbols spells it. | |
| timeframe | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | Yes | The bars, oldest first. | |
| count | Yes | Number of bars returned. | |
| source | Yes | Data source that produced these bars. | |
| symbol | Yes | Symbol these bars belong to. | |
| synthetic | Yes | True when the prices are generated, not observed. | |
| timeframe | Yes | Timeframe of each bar. |