candles
Pack: okx · Endpoint: https://gateway.pipeworx.io/okx/mcp
OKX crypto exchange OHLC candles for a spot/perp/futures instrument. Bars 1m through 1M. Use for charting and backtesting OKX instruments.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
instId | string | yes | |
bar | string | no | |
after | string | no | |
before | string | no | |
limit | number | no |
Example call
Arguments
{
"instId": "BTC-USDT",
"bar": "1H"
}
curl
curl -X POST https://gateway.pipeworx.io/okx/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"candles","arguments":{"instId":"BTC-USDT","bar":"1H"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('candles', {
"instId": "BTC-USDT",
"bar": "1H"
});
More examples
{
"instId": "ETH-USDT",
"bar": "4H",
"limit": 100
}
Response shape
Full JSON Schema
{
"type": "object",
"description": "Response from OKX candles endpoint"
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"okx": {
"url": "https://gateway.pipeworx.io/okx/mcp"
}
}
}
See Getting Started for client-specific install steps.