{"uid":"cap_AnfQ0BlZU_35eMeRqrP34","slug":"2s-io-cex-ohlcv-candlesticks-b54e36a0","name":"2s.io CEX OHLCV Candlesticks","description":"Centralized-exchange OHLCV candlesticks for a spot trading pair (e.g. BTC-USD, ETH-USD, SOL-USD), free/keyless. Pass interval (1m/5m/15m/1h/6h/1d) and limit. Each bar: time, open, high, low, close, volume. Net-new vs crypto.dex-ohlcv (on-chain DEX) — this is CEX spot.","url":"https://2s.io/api/crypto/cex-klines","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"type":"object","required":["pair"],"properties":{"pair":{"type":"string","description":"Trading pair, e.g. BTC-USD."},"limit":{"type":"integer","maximum":300,"minimum":1},"interval":{"enum":["1m","5m","15m","1h","6h","1d"],"type":"string"}},"additionalProperties":false}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0036","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"0.3600","medianCents":"0.3600","p90Cents":"0.3600","minCents":"0.3600","maxCents":"0.3600","p95Cents":"0.3600","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0036/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_10PmmqJxl85DAwVmZA9oY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0036","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns OHLCV candlestick bars for a centralized-exchange spot trading pair (e.g. BTC-USD) at a given interval and limit.","exampleAgentPrompt":"Can you pull the last 100 one-hour OHLCV candles for BTC-USD from a centralized exchange spot market?","exampleUseCases":null,"resultDescription":"An array of candlestick bars, each containing: timestamp, open, high, low, close, and volume for the requested trading pair at the specified interval.","failureModes":["Invalid or unsupported trading pair returns an error or empty result","Unsupported interval value (not one of 1m/5m/15m/1h/6h/1d) causes a validation error","Limit out of range (less than 1 or greater than 300) causes a validation error","Payment failure or insufficient USDC balance prevents access","Network or upstream exchange data unavailability causes a timeout or 5xx error"],"whenToPreferThis":"Use this endpoint when you need OHLCV candlestick data from centralized exchange (CEX) spot markets. Prefer this over on-chain DEX OHLCV endpoints (e.g. crypto.dex-ohlcv) when you need traditional exchange price data rather than DeFi liquidity pool pricing. Ideal for charting, technical analysis, backtesting, or any workflow requiring structured time-series price bars for major crypto pairs like BTC-USD, ETH-USD, or SOL-USD without needing an API key.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:17:39.333Z","isFirstParty":false}