tv_data_get_bars
Fetch historical OHLCV bars for any symbol. Returns time, open, high, low, close, volume arrays, with cached repeat queries for quick access.
Instructions
Fetch historical OHLCV bars. Cached in Parquet; repeat queries are instant.
Providers: dukascopy (free, deep history to ~2000s, first fetch of a range is
slow) and oanda (real broker mid prices, needs OANDA_API_KEY). Bars are UTC,
returned as arrays [time_iso, open, high, low, close, volume]. The provider
field in the result names the feed - feeds disagree; levels are feed-specific.
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": {
"symbol": "<symbol>"
},
"name": "tv_data_get_bars"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ISO date/datetime UTC. Default: now. | |
| count | No | Max bars returned (tail of range) | |
| start | No | ISO date/datetime UTC, e.g. 2026-07-01. Default: computed back from `count`. | |
| symbol | Yes | Any alias: EURUSD, OANDA:EURUSD, EUR_USD, eurusd | |
| provider | No | auto | dukascopy | oanda. auto prefers OANDA when a key is configured. | auto |
| timeframe | No | M1, M5, M15, M30, H1, H4, D1 (aliases like 15m/1h accepted) | M15 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||