binance_get_klines
Fetch OHLCV candlestick data for a trading pair to analyze price history and technical indicators over a chosen interval and time window.
Instructions
Fetch OHLCV candlestick data for a symbol.
Calls GET /api/v3/klines (weight 2).
When to Use:
For price history / technical analysis over a chosen interval and window.
When NOT to Use:
For presentation-smoothed candles matching Binance's own chart UI — use
binance_get_ui_klinesinstead.For the single latest price — use
binance_get_ticker_price.
Returns:
Markdown: a table of up to 100 candles (open time, OHLC, volume, close time). JSON:
the raw array-of-arrays Binance returns (up to limit), uncapped.
Pagination:
Walk forward with start_time set to the previous page's last close time + 1ms;
start_time/end_time are always interpreted in UTC even when time_zone is set.
Examples: params = {"symbol": "BTCUSDT", "interval": "1h", "limit": 200}
Error Handling:
An unknown symbol raises Binance -1121 Invalid symbol; an invalid interval is
rejected locally by the KlineInterval enum.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |