Skip to content
GET /v1/candles

OHLC candles

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/okx-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/okx-api/v1/candles" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/okx-api/v1/candles", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/okx-api/v1/candles");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/okx-api/v1/candles",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "bar": "1H",
        "inst": "ETH-USDT",
        "count": 50,
        "source": "OKX",
        "candles": [
            {
                "iso": "2026-06-09T20:00:00.000Z",
                "low": 1655.65,
                "high": 1663.98,
                "open": 1657.48,
                "time": 1781035200000,
                "close": 1656.21,
                "volume": 2280.158764
            },
            {
                "iso": "2026-06-09T19:00:00.000Z",
                "low": 1646.79,
                "high": 1658.68,
                "open": 1652.28,
                "time": 1781031600000,
                "close": 1657.47,
                "volume": 5388.015143
            },
            {
                "iso": "2026-06-09T18:00:00.000Z",
                "low": 1640,
                "high": 1655.7,
                "open": 1643.04,
                "time": 1781028000000,
                "close": 1652.28,
                "volume": 4506.621654
            },
            {
                "iso": "2026-06-09T17:00:00.000Z",
                "low": 1632.25,
                "high": 1650,
                "open": 1632.29,
                "time": 1781024400000,
                "close": 1642.93,
                "volume": 6823.332069
            },
            {
                "iso": "2026-06-09T16:00:00.000Z",
                "low": 1614.19,
                "high": 1639.52,
                "open": 1636.35,
                "time": 1781020800000,
                "close": 1632.29,
                "volume": 15381.893379
            },
            {
                "iso": "2026-06-09T15:00:00.000Z",
                "low": 1634.44,
                "high": 1653.99,
                "open": 1645.94,
                "time": 1781017200000,
                "close": 1636.17,
                "volume": 8888.448235
            },
            {
                "iso": "2026-06-09T14:00:00.000Z",
                "low": 1633.59,
                "high": 1671.03,
                "open": 1666.74,
                "time": 1781013600000,
                "close": 1645.99,
                "volume": 24841.67756
            },
            {
                "iso": "2026-06-09T13:00:00.000Z",
                "low": 1662.98,
                "high": 1680.4,
                "open": 1676.79,
                "time": 1781010000000,
                "close": 1666.66,
                "volume": 12294.768466
            },
            {
                "iso": "2026-06-09T12:00:00.000Z",
                "low": 1670.98,
                "high": 1683.22,
                "open": 1671.73,
                "time": 1781006400000,
                "close": 1676.8,
                "volume": 6937.913775
            },
            {
                "iso": "2026-06-09T11:00:00.000Z",
                "low": 1666.14,
                "high": 1675.5,
                "open": 1674.48,
                "time": 1781002800000,
                "close": 1671.83,
                "volume": 3173.796358
 
…