get_kline
Retrieve candlestick (K-line) data for a specific trading pair and time interval. Specify category, symbol, interval, and optional start, end, and limit parameters to analyze market trends and price movements.
Instructions
Get K-line (candlestick) data
Args:
category (str): Category (spot, linear, inverse, etc.)
symbol (str): Symbol (e.g., BTCUSDT)
interval (str): Time interval (1, 3, 5, 15, 30, 60, 120, 240, 360, 720, D, W, M)
start (Optional[int]): Start time in milliseconds
end (Optional[int]): End time in milliseconds
limit (int): Number of records to retrieve
Returns:
Dict: K-line data
Example:
get_kline("spot", "BTCUSDT", "1h", 1625097600000, 1625184000000, 100)
Reference:
https://bybit-exchange.github.io/docs/v5/market/kline
Input Schema
Name | Required | Description | Default |
---|---|---|---|
category | Yes | Category (spot, linear, inverse, etc.) | |
end | No | End time in milliseconds | |
interval | Yes | Time interval (1, 3, 5, 15, 30, 60, 120, 240, 360, 720, D, W, M) | |
limit | No | Number of records to retrieve | |
start | No | Start time in milliseconds | |
symbol | Yes | Symbol (e.g., BTCUSDT) |
Input Schema (JSON Schema)
{
"properties": {
"category": {
"description": "Category (spot, linear, inverse, etc.)",
"title": "Category",
"type": "string"
},
"end": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "End time in milliseconds",
"title": "End"
},
"interval": {
"description": "Time interval (1, 3, 5, 15, 30, 60, 120, 240, 360, 720, D, W, M)",
"title": "Interval",
"type": "string"
},
"limit": {
"default": 200,
"description": "Number of records to retrieve",
"title": "Limit",
"type": "integer"
},
"start": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Start time in milliseconds",
"title": "Start"
},
"symbol": {
"description": "Symbol (e.g., BTCUSDT)",
"title": "Symbol",
"type": "string"
}
},
"required": [
"category",
"symbol",
"interval"
],
"title": "get_klineArguments",
"type": "object"
}