market_candles
Load price history and return a handle to it, plus a summary. The bars themselves are deliberately not returned — pass the handle to the compute tools instead. lastClosedCandle is one exact OHLC bar; high/low are WHOLE-WINDOW wick extremes with highAt/lowAt timestamps; from/to are window boundaries, not swing anchors. bars includes a possible forming bar: request N+1 for N closed bars and check closedBars. Defaults to whatever is on the chart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | Default 1000, max 50000. | |
| market | No | Default: the chart. | |
| symbol | No | Default: the chart. | |
| exchange | No | ||
| timeframe | No | e.g. 15m, 1h, 4h, 1d. | |
| withDerivatives | No | Also load funding, open interest and positioning for this contract. |