Yes. Ask your agent in the Reamer Research app for OKX bars, such as "a year of BTC-USDT 1-hour bars from OKX", and it downloads them from OKX's public candlestick history endpoint into a CSV ready to backtest. No OKX account or key is needed. The same spec covers spot pairs and perpetual swaps. Reamer Research is a quant workstation built on a high-performance C++ core. Describe a strategy in plain English, and your AI agent writes it, backtests it and shows you every trade.
How it works
- Install the app with
uv tool install reamer-researchand start it withreamer-research. - Ask for the bars in the chat. Your agent reads OKX's API docs with
web_fetch, and the app asks you before each page it reads. - The agent writes the spec,
sources/okx.json, and runstest_source, which fetches BTC-USDT and checks every bar: prices, high and low, volume, duplicate times, spacing against the timeframe and the time grid. - Once every check passes,
fetch_barswrites one CSV per symbol todata/, from the start up to, not including, the end, and the bars are ready to backtest.
The spec is saved in your workspace, so later asks for OKX bars skip straight to the download.
What you get
- OKX's history-candles endpoint serves spot instruments such as BTC-USDT and swaps such as BTC-USDT-SWAP with no key.
- Each CSV has Date, Time (UTC), Open, High, Low, Close and Volume.
- Timeframes: 1m, 5m, 15m, 30m, 1h, 4h, 1d and 1w, with daily and weekly bars on UTC boundaries.
- Each request returns up to 100 bars, and the app splits a long range into as many requests as it needs. OKX leaves out both ends of each requested range; the app 5.7.1 and the MCP server 0.5.1 reach one bar past each end, so every bar arrives.
On 2026-12-05, 2025 of BTC-USDT 1-hour bars came back as 8,760 bars, every hour of the year, and the same spec passed on BTC-USDT-SWAP.
The spec
This spec passed test_source on 2026-12-05, with OKX's my.okx.com host in place of www.okx.com, which serves the same API. Your agent writes its own from OKX's docs, and it will look much like this:
{
"spec": 1,
"name": "OKX",
"url": "https://www.okx.com/api/v5/market/history-candles",
"params": {
"instId": "{symbol}",
"bar": "{timeframe}",
"after": "{end}",
"before": "{start}",
"limit": "100"
},
"time_param": "unix_ms",
"timeframes": {
"1m": "1m",
"5m": "5m",
"15m": "15m",
"30m": "30m",
"1h": "1H",
"4h": "4H",
"1d": "1Dutc",
"1w": "1Wutc"
},
"rows": "data",
"layout": "arrays",
"fields": {
"time": 0,
"open": 1,
"high": 2,
"low": 3,
"close": 4,
"volume": 5
},
"time_format": "unix_ms",
"timezone": "UTC",
"bar_time": "open",
"pages": {
"type": "window",
"size": 100
},
"per_minute": 600
}
From your own MCP client
The Reamer Research MCP server has the same source_spec, test_source and fetch_bars tools, so Claude Code, Cursor or any MCP client can fetch OKX bars the same way. See Data from any REST API.
The app and the server are free to install. Evaluation Mode backtests one ticker over up to 30 days or 50,000 bars, and $20 a month removes the limits. See pricing and Can I backtest on data from any market data API?
Try it in Reamer Research
Install the app with uv tool install reamer-research, start it with reamer-research, and paste this into the chat:
Fetch the last 30 days of BTC-USDT-SWAP 1-hour bars from OKX, then backtest a breakout strategy on them with realistic costs and run Monte Carlo on the trades.