Get recent bars
get_barsFetch recent OHLCV bars for a symbol, oldest first, each labeled by its UTC open time. Returns only closed bars; check current prices and symbol availability through related tools.
Instructions
Return the most recent OHLCV bars for a symbol, oldest first.
Times are UTC and label each bar's OPEN, the left edge of the interval it covers.
count is capped by the server (see the server instructions for the current
limit); ask for a coarser timeframe rather than more bars. The bar that is still
forming is never returned, so the newest bar is always a closed one; call get_quote
for the current price. An unknown or unavailable symbol returns a tool error naming
the symbol; call list_symbols first if unsure. On the replay source the prices are
generated, not recorded from any market.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many of the most recent bars to return, newest last. | |
| 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. |