{"uid":"cap_nd2n6s77tHMkGcsr2-ubs","slug":"token-ohlcv-candles-api-e6916a0f","name":"Token OHLCV Candles API","description":"Get historical OHLCV candles for any token by ID or contract address (POST variant)","url":"https://token-ohlcv.api.klymax402.com/api/candles","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","required":[],"properties":{"days":{"type":"number","description":"Number of days of history (default 30, max 365). For 1h interval max 2 days, for 4h max 90 days."},"chain":{"type":"string","description":"Blockchain network for contract lookup: base, ethereum, solana, arbitrum, polygon, optimism, bsc."},"token":{"type":"string","description":"CoinGecko token ID (e.g. bitcoin, ethereum, solana). Use this OR contract+chain."},"contract":{"type":"string","description":"On-chain contract address (e.g. 0x...). Use with chain parameter for GeckoTerminal lookup."},"interval":{"type":"string","description":"Candle interval: daily (default), 4h (if days <= 90), 1h (if days <= 2)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_k2I06Zbt2eZl0hNaIRqpK","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 historical OHLCV (open, high, low, close, volume) candlestick data for any token by CoinGecko ID or on-chain contract address","exampleAgentPrompt":"Can you pull the daily OHLCV candles for Ethereum over the last 90 days using the CoinGecko token ID 'ethereum'?","exampleUseCases":null,"resultDescription":"Returns an array of OHLCV candlestick objects for the requested token, each containing timestamp, open, high, low, close, and volume values at the specified interval (daily, 4h, or 1h) over the requested time window.","failureModes":["Invalid or unknown token ID returns an error or empty result","Contract address provided without chain parameter causes lookup failure","Requested interval not supported for the given number of days (e.g. 1h interval with more than 2 days) returns an error","Unsupported blockchain network in chain parameter returns an error","Exceeding the 365-day maximum history returns a validation error","Payment not processed (x402 payment required) returns 402 status"],"whenToPreferThis":"Use this endpoint when you need historical OHLCV candlestick data for any token — whether a major coin by CoinGecko ID or a long-tail DeFi token by on-chain contract address across multiple chains including Base, Ethereum, Solana, Arbitrum, Polygon, Optimism, and BSC. Prefer this over generic price APIs when you need structured candlestick intervals (daily, 4h, 1h) for charting, backtesting, or price analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:39:07.120Z","isFirstParty":false}