data_get_ohlcv
Retrieve historical OHLCV bars from the active chart to compute models or inspect price action; use summary mode for bounds and closed-only filtering to avoid unconfirmed candles.
Instructions
Get historical OHLCV bar data from active chart. Supports compact statistical summary mode (summary: true) for context efficiency, and closed-only filtering (closedOnly: true) to avoid unconfirmed candle hallucinations. WHEN TO USE: Call when computing quantitative models or inspecting raw price action. Use summary: true when only high/low/close bounds are needed to conserve token context. SIDE EFFECTS: None (Read-only). LIMITATIONS: Maximum 500 bars per request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of bars to retrieve (max 500, default 100) | |
| summary | No | Return summary stats (high, low, open, close, avg volume, range) instead of all bars — much smaller output | |
| closedOnly | No | Exclude the active, currently-forming candle so only confirmed historical bars are returned | |
| expectedTf | No | Assert that the returned data matches this timeframe, throwing an error if chart has not switched | |
| expectedSymbol | No | Assert that the returned data matches this symbol, throwing an error if chart has not switched |