Get OKX candlestick bars
get_okx_candlesFetch OHLCV candlestick bars for an OKX spot or perpetual swap instrument, letting you retrieve interval-based price history to analyze trends and build charts.
Instructions
Fetch OHLCV candlestick bars for an OKX spot or perpetual swap instrument.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_okx_candles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | No | Candle interval (default "1H"). | |
| limit | No | Number of candles to return (default 12, max 50). | |
| inst_id | No | OKX instrument ID such as "BTC-USDT" (default) or "ETH-USDT-SWAP". |