get_candles
Fetch historical OHLCV candlestick data for an instrument across a date range and interval to analyze price trends and volume.
Instructions
Get historical candles (OHLCV) for an instrument.
Returns {"columns": ["time", "open", "high", "low", "close", "volume", "volumeBuy", "volumeSell"], "candles": [...]}: one row per candle, oldest first, in the order of "columns". Volumes are in lots; the two columns splitting volume into buys and sells are there when the API has them. For day, week and month candles "time" is a date. "last_candle_complete": false appears when the last candle's period is still running — its close is the current price, not a close. A bond's prices are in percent of its nominal, not in money. Candles from before a split or a consolidation usually come recalculated to today's shares, while operations keep the prices and quantities of their day.
The API limits the period one request may span: a day for minute candles, a week for 5-10 minute ones, 3 weeks for 15-30 minute ones, 3 months for hourly ones, 6 years for daily ones. A year of daily candles is about 22,000 characters; several years of them do not fit into a client's limit — ask for weekly or monthly candles instead.
Args: instrument_id: Instrument ticker, FIGI, ISIN or UID from_date: Start date (YYYY-MM-DD), default: 30 days ago to_date: End date (YYYY-MM-DD, inclusive), default: now interval: Candle interval — CANDLE_INTERVAL_1_MIN, CANDLE_INTERVAL_5_MIN, CANDLE_INTERVAL_15_MIN, CANDLE_INTERVAL_HOUR, CANDLE_INTERVAL_DAY, CANDLE_INTERVAL_WEEK, CANDLE_INTERVAL_MONTH (also 5/10/30_SEC, 2/3/10/30_MIN, 2/4_HOUR)
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": {
"instrument_id": "<instrument_id>"
},
"name": "get_candles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_date | No | ||
| interval | No | CANDLE_INTERVAL_DAY | |
| from_date | No | ||
| instrument_id | Yes |