{"uid":"cap_K5K-4QA1qP9arJvRfR0F2","slug":"debyko-crypto-perpetuals-ohlcv-candles-c2ff309b","name":"DEBYKO Crypto Perpetuals OHLCV Candles","description":"OHLCV candles for crypto perpetual futures, 1m to 1d, on trade price (mark and index where the venue publishes them), across 19 venues (Aster Perpetuals, Avantis, Binance USD-M Futures, Bitget Perpetual Futures, Bybit Perpetuals, Coinbase Global Derivatives, Coinbase — legacy API, migrated and 12 more). Built from venue 1-minute klines; periods with no data come back as gap rows, not interpolated. DQL filter, timeframe, from, to. No charge when no candle is returned. 0.005 USDC per call.","url":"https://api.debyko.com/v2/candles?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{3})?Z$","description":"End of the window, UTC, e.g. 2026-10-01T06:00:00Z."},"from":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{3})?Z$","description":"Start of the window, UTC, e.g. 2026-10-01T00:00:00Z."},"kind":{"enum":["perpetual","spot","all"],"type":"string","default":"perpetual"},"as_of":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{3})?Z$"},"trade":{"type":"boolean"},"units":{"enum":["published","base"],"type":"string","default":"published"},"where":{"oneOf":[{"type":"string"},{"type":"object"}],"description":"DQL selection of the markets to read, e.g. base in (BTC) or venue = HYPERLIQUID and base = BTC."},"timeframe":{"type":"string","description":"Candle period, e.g. 1m, 15m, 1h or 1d; GET /v2/dql/catalogue lists them."},"price_type":{"enum":["trade","mark","index"],"type":"string","default":"trade","description":"trade (default), mark or index."},"closed_only":{"type":"boolean","default":true},"include_gaps":{"type":"boolean","default":true,"description":"true (default) keeps periods with no candle as gap rows."},"number_format":{"enum":["json","string"],"type":"string","default":"json"},"include_synthetic":{"type":"boolean","default":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vavPatjbKlUJkPqXrzhgX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns completed OHLCV candle data for crypto perpetual markets across multiple venues, built from stored trades, with timeframes from 1-minute to 1-day.","exampleAgentPrompt":"Pull 1-hour trade-price candles for BTC perpetuals on Binance from 2024-01-01T00:00:00Z to 2024-01-07T00:00:00Z, closed candles only, with volumes in quote units.","exampleUseCases":[{"title":"Backtest strategy on BTC perp","prompt":"Give me daily OHLCV candles for BTC perpetuals on Bybit from 2023-06-01T00:00:00Z to 2023-12-31T00:00:00Z using trade prices, closed candles only, with volumes in base units — I want to run a moving-average backtest."},{"title":"Compare mark vs trade price candles","prompt":"Fetch 15-minute mark-price candles and 15-minute trade-price candles for ETH perpetuals on OKX from 2024-03-01T00:00:00Z to 2024-03-02T00:00:00Z so I can compare the spread between mark and trade prices over that day."},{"title":"Monitor intraday volume for SOL perps","prompt":"Get 5-minute candles for SOL perpetuals across all venues from 2024-04-10T08:00:00Z to 2024-04-10T16:00:00Z with quote-unit volumes and gap filling enabled so I can spot intraday liquidity patterns."}],"resultDescription":"An array of completed OHLCV candle objects per requested timeframe and venue, each containing open, high, low, close, and volume values (in the requested units), along with the candle's timestamp. Data is derived from stored trades and may include synthetic candles if enabled. Gaps can be included or excluded based on the include_gaps flag.","failureModes":["Invalid datetime format in 'from' or 'to' fields — must match ISO 8601 pattern with Z suffix","Unsupported timeframe string causing a 400 error","No data available for the requested symbol/venue combination in the given date range","Payment failure via x402 protocol resulting in 402 response","Requesting future candles that are not yet closed","Invalid 'where' filter causing query rejection"],"whenToPreferThis":"Use this endpoint when you need historical OHLCV candlestick data specifically for crypto perpetual/swap markets (not spot), aggregated from actual stored trades, across multiple venues simultaneously. It is the right choice when you need flexible timeframes (1m to 1d), multiple price types (trade, mark, index), or venue-level granularity for derivatives analytics, backtesting, or strategy research. Prefer this over generic market data APIs when you need perpetuals-specific data (mark price, index price) or cross-venue comparison in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T06:31:30.803Z","isFirstParty":false,"canonicalSlug":"debyko-crypto-perpetuals-ohlcv-candles-c2ff309b"}