{"uid":"cap_QXzDfF5bi2CxYY0lnZoCt","slug":"okx-ohlcv-candlestick-data-api-5e9a7599","name":"OKX OHLCV Candlestick Data API","description":"Live OHLCV candlestick data for any crypto symbol from OKX across timeframes (1m to 1w), with high/low/change summary - real-time price history absent from LLM training data. ohlcv, candlestick, candles, price history, kline, crypto chart data Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/market/ohlcv","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"coin":{"type":"string","description":"Coin (optional)"},"limit":{"type":"string","description":"Number of candles, default 24, max 300"},"symbol":{"type":"string","description":"Crypto symbol, e.g. BTC (default), ETH, SOL"},"interval":{"type":"string","description":"Timeframe: 1m,5m,15m,1h (default),4h,1d,1w"},"timeframe":{"type":"string","description":"Timeframe (optional)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"limit":50,"symbol":"BTC-USDT","timeframe":"1h"},"response":{"_hint":"x402 paid endpoints for AI agents — x402node.dev (utilities) · cn402.com (Chinese culture)","count":50,"instId":"BTC-USDT","latest":{"time":"2026-06-17T21:00:00.000Z","close":64409.7},"source":"okx","symbol":"BTC","candles":[{"low":66486.8,"high":66686.5,"open":66617.9,"time":"2026-06-15T20:00:00.000Z","close":66525.2,"volume":140.192283},{"low":66341.5,"high":66567.9,"open":66525.2,"time":"2026-06-15T21:00:00.000Z","close":66372,"volume":108.7742435},{"low":66101,"high":66477.1,"open":66372.1,"time":"2026-06-15T22:00:00.000Z","close":66208.1,"volume":175.14140065},{"low":66118.5,"high":66377.5,"open":66208.1,"time":"2026-06-15T23:00:00.000Z","close":66323.1,"volume":80.92795654},{"low":66243.2,"high":66467.4,"open":66323.1,"time":"2026-06-16T00:00:00.000Z","close":66253.1,"volume":97.35440243},{"low":66249.2,"high":66424.9,"open":66253.2,"time":"2026-06-16T01:00:00.000Z","close":66352.7,"volume":104.70094016},{"low":65681.7,"high":66372.7,"open":66352.7,"time":"2026-06-16T02:00:00.000Z","close":65742.8,"volume":372.32049654},{"low":65659.7,"high":66171.1,"open":65742.9,"time":"2026-06-16T03:00:00.000Z","close":66162.8,"volume":214.72577905},{"low":65800,"high":66282.2,"open":66162.8,"time":"2026-06-16T04:00:00.000Z","close":65844.5,"volume":163.7451283},{"low":65844.5,"high":66153.5,"open":65844.5,"time":"2026-06-16T05:00:00.000Z","close":66059.7,"volume":231.33548045},{"low":66059.7,"high":66565.9,"open":66059.8,"time":"2026-06-16T06:00:00.000Z","close":66440.7,"volume":202.71864539},{"low":66298.9,"high":66530.3,"open":66440.7,"time":"2026-06-16T07:00:00.000Z","close":66370,"volume":197.25744887},{"low":66342.2,"high":66994.9,"open":66370,"time":"2026-06-16T08:00:00.000Z","close":66900.7,"volume":217.02413865},{"low":66480,"high":66925.2,"open":66901.4,"time":"2026-06-16T09:00:00.000Z","close":66509.5,"volume":178.68236299},{"low":66492.8,"high":66782.2,"open":66511,"time":"2026-06-16T10:00:00.000Z","close":66513,"volume":137.91142887},{"low":66372.3,"high":66652.7,"open":66513,"time":"2026-06-16T11:00:00.000Z","close":66491.7,"volume":120.20164878},{"low":66370.1,"high":66816.6,"open":66491.7,"time":"2026-06-16T12:00:00.000Z","close":66430.8,"volume":171.39616722},{"low":65941.1,"high":66469.5,"open":66430.8,"time":"2026-06-16T13:00:00.000Z","close":66047.9,"volume":320.9080528},{"low":65366,"high":66263.1,"open":66054.2,"time":"2026-06-16T14:00:00.000Z","close":65662.5,"volume":500.00917141},{"low":65612.7,"high":66000,"open":65662.5,"time":"2026-06-16T15:00:00.000Z","close":65873.4,"volume":313.66034652},{"low":65704,"high":65963.6,"open":65873.2,"time":"2026-06-16T16:00:00.000Z","close":65762.5,"volume":208.54310077},{"low":65709.7,"high":66019.1,"open":65762.5,"time":"2026-06-16T17:00:00.000Z","close":65981.2,"volume":137.70362499},{"low":65800.1,"high":66245,"open":65981.3,"time":"2026-06-16T18:00:00.000Z","close":65851.4,"volume":196.31116863},{"low":65560,"high":65851.5,"open":65851.5,"time":"2026-06-16T19:00:00.000Z","close":65687,"volume":177.07418596},{"low":65584.5,"high":65869.6,"open":65688.3,"time":"2026-06-16T20:00:00.000Z","close":65864.1,"volume":65.37025537},{"low":65646.9,"high":65945.7,"open":65864.2,"time":"2026-06-16T21:00:00.000Z","close":65778.1,"volume":62.41521154},{"low":65680.1,"high":65890.7,"open":65778.1,"time":"2026-06-16T22:00:00.000Z","close":65784.2,"volume":52.41079683},{"low":65625.1,"high":65839.9,"open":65784.3,"time":"2026-06-16T23:00:00.000Z","close":65680,"volume":44.85702532},{"low":65680,"high":65855,"open":65680,"time":"2026-06-17T00:00:00.000Z","close":65712.4,"volume":76.13046787},{"low":65475.9,"high":65957.2,"open":65712.5,"time":"2026-06-17T01:00:00.000Z","close":65938.9,"volume":178.92479408},{"low":65779.4,"high":66149.7,"open":65941.3,"time":"2026-06-17T02:00:00.000Z","close":65907.7,"volume":130.44164846},{"low":65709.9,"high":65907.8,"open":65907.8,"time":"2026-06-17T03:00:00.000Z","close":65855.2,"volume":58.28448213},{"low":65792.9,"high":66052.6,"open":65855.6,"time":"2026-06-17T04:00:00.000Z","close":65891,"volume":67.5557349},{"low":65745.1,"high":65987.2,"open":65891.1,"time":"2026-06-17T05:00:00.000Z","close":65836,"volume":84.16804672},{"low":65582.3,"high":65902.2,"open":65835.9,"time":"2026-06-17T06:00:00.000Z","close":65624.3,"volume":99.12015395},{"low":65249.9,"high":65720.1,"open":65626.2,"time":"2026-06-17T07:00:00.000Z","close":65542,"volume":544.38635351},{"low":64832.3,"high":65585.1,"open":65541.4,"time":"2026-06-17T08:00:00.000Z","close":64926.3,"volume":350.99979718},{"low":64838.8,"high":65082,"open":64926.3,"time":"2026-06-17T09:00:00.000Z","close":64916.7,"volume":127.12708331},{"low":64766.5,"high":64999.9,"open":64916.8,"time":"2026-06-17T10:00:00.000Z","close":64799.9,"volume":134.16605836},{"low":64560.6,"high":64866.6,"open":64800,"time":"2026-06-17T11:00:00.000Z","close":64808,"volume":210.11252205},{"low":64587.8,"high":65108.8,"open":64808,"time":"2026-06-17T12:00:00.000Z","close":65036.1,"volume":245.92697718},{"low":64842.1,"high":65369.7,"open":65036.1,"time":"2026-06-17T13:00:00.000Z","close":65273.5,"volume":341.46797404},{"low":64773,"high":65456.5,"open":65271,"time":"2026-06-17T14:00:00.000Z","close":65102.9,"volume":421.80973287},{"low":64980.2,"high":65854.6,"open":65102.9,"time":"2026-06-17T15:00:00.000Z","close":65752.3,"volume":345.12066588},{"low":65718.2,"high":66436.1,"open":65752.3,"time":"2026-06-17T16:00:00.000Z","close":65863.4,"volume":379.04435057},{"low":65786.4,"high":66194.3,"open":65863.5,"time":"2026-06-17T17:00:00.000Z","close":66111.7,"volume":125.49913957},{"low":64801.5,"high":66111.5,"open":66103,"time":"2026-06-17T18:00:00.000Z","close":65511.1,"volume":929.51115746},{"low":64042.2,"high":65665.1,"open":65508.1,"time":"2026-06-17T19:00:00.000Z","close":64300.7,"volume":1056.70545431},{"low":64175,"high":64490.1,"open":64300.7,"time":"2026-06-17T20:00:00.000Z","close":64432.1,"volume":243.60257251},{"low":64259.9,"high":64454.5,"open":64432.1,"time":"2026-06-17T21:00:00.000Z","close":64409.7,"volume":51.46356288}],"summary":{"low":64042.2,"high":66994.9,"changePct":-3.18},"interval":"1h"}},"exampleRequest":{"limit":50,"symbol":"BTC-USDT","timeframe":"1h"},"tags":["x402"],"displayCostAmount":"0.006","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":1,"rating":{"score":"1.00","successRate":"1.00","reviews":1,"stars":"5.0","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SWLuohxr02tb0YgeS9iVv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns live OHLCV (open, high, low, close, volume) candlestick data for any crypto symbol from OKX across timeframes from 1 minute to 1 week, including high/low/change summary statistics.","exampleAgentPrompt":"Can you pull the last 50 one-hour OHLCV candles for BTC-USDT from OKX so I can see recent price action and the high/low/change summary?","exampleUseCases":null,"resultDescription":"An array of OHLCV candlestick bars for the requested crypto symbol and timeframe, each containing open, high, low, close, and volume values, plus an overall summary of the period's high, low, and price change percentage.","failureModes":["Unknown or unsupported symbol returns an error or empty dataset","Invalid timeframe parameter (outside 1m–1w range) returns a 400 error","OKX data source temporarily unavailable causes a 502 or timeout","Payment of 0.006 USDC not completed results in 402 Payment Required","Rate limiting if too many requests are made in quick succession"],"whenToPreferThis":"Use this endpoint when you need real-time or recent OHLCV candlestick data sourced specifically from OKX, especially for crypto symbols traded on OKX perpetuals or spot markets, and when you need flexible timeframes from 1-minute to 1-week with a built-in high/low/change summary. Prefer this over general market data APIs when OKX price feeds are specifically required or when LLM training data is insufficient for current price history.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":1,"lastUsedAt":"2026-07-02T22:42:16.323Z","lastSuccessfullyRanAt":"2026-07-02T22:42:16.323Z","lastHealthCheckAt":"2026-09-13T12:54:01.777Z","isFirstParty":false}