get_kline
Retrieve historical candlestick data (OHLC prices and volume) from Bybit for technical analysis of trading pairs across futures, options, and spot markets.
Instructions
Get historical candlestick/OHLC data for technical analysis. Returns open, high, low, close prices and volume data. If no time range specified, returns recent data ending at current time.
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": "get_kline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Product type: 'linear' for USDT perpetuals (most common), 'inverse' for coin-margined futures, 'option' for options, 'spot' for spot trading | linear |
| symbol | Yes | Trading pair symbol. Examples: 'BTCUSDT', 'ETHUSDT', 'SOLUSDT' | |
| interval | No | Time interval for each candlestick. Minutes: '1', '3', '5', '15', '30', '60' (1h), '120' (2h), '240' (4h), '360' (6h), '720' (12h). Periods: 'D' (daily), 'W' (weekly), 'M' (monthly) | D |
| start | No | Start time in milliseconds timestamp (OPTIONAL). If not provided, returns recent data. This is the OLDEST time point you want (furthest back in time). Example: 1640995200000 for Jan 1, 2022 | |
| end | No | End time in milliseconds timestamp (OPTIONAL). If not provided, defaults to current time. This is the NEWEST time point you want (most recent). Must be after start time. | |
| limit | No | Maximum number of candlesticks to return (OPTIONAL). Range: 1-1000. If not specified, API will use a reasonable default based on the interval. |