Crypto index candlesticks (OKX)
crypto_index_candlesGet OHLC candlestick data for OKX crypto indices (e.g., BTC-USD, ETH-USD) with configurable bar intervals and row limits.
Instructions
OHLC candlesticks for an OKX index (not a tradable instrument). Use index ids of the form 'BTC-USD' or 'ETH-USD'. Rows: [ts, open, high, low, close, confirm]. Example: { instId: "BTC-USD", bar: "1H", limit: 100 }
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": {
"instId": "<instId>"
},
"name": "crypto_index_candles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | No | 1H | |
| limit | No | ||
| instId | Yes | Index id, e.g. BTC-USD or ETH-USD |