{"uid":"cap_mMQyMfTFxgYpdjHt9avT1","slug":"coingecko-ohlc-candlestick-data-b3519d92","name":"CoinGecko OHLC Candlestick Data","description":"OHLC candlestick data for crypto — daily open/high/low/close candles over 1-365 days for any coin by CoinGecko id, chart-ready.","url":"https://coingecko.use.x402atlas.com/ohlc?utm_source=zero.xyz","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":["id","days"],"properties":{"id":{"type":"string","description":"CoinGecko coin id slug"},"days":{"enum":[1,7,14,30,90,180,365],"type":"integer","description":"Window size in days: one of 1, 7, 14, 30, 90, 180, 365"},"vs_currency":{"type":"string","default":"usd","description":"Target currency code (default: usd)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["queried_at","id","vs_currency","days","candles"],"properties":{"id":{"type":"string","description":"CoinGecko coin id slug"},"days":{"type":"integer","description":"Requested window size in days"},"candles":{"type":"array","items":{"type":"object","required":["time","open","high","low","close"],"properties":{"low":{"type":"number","description":"Low price"},"high":{"type":"number","description":"High price"},"open":{"type":"number","description":"Open price"},"time":{"type":"string","format":"date-time","description":"Candle timestamp (UTC)"},"close":{"type":"number","description":"Close price"}}},"description":"OHLC bars, oldest first"},"queried_at":{"type":"string","format":"date-time","description":"UTC timestamp the upstream was queried"},"vs_currency":{"type":"string","description":"Currency the candles are quoted in"}}}}}}},"responseSchema":{"type":"json","example":{"id":"bitcoin","days":30,"candles":[{"low":26900,"high":27100,"open":27000,"time":"2026-05-08T00:00:00Z","close":27050}],"queried_at":"2026-06-08T12:00:00Z","vs_currency":"usd"}},"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_N57YWDI9KSmqYhg0Cu9eL","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 daily open/high/low/close candlestick price data for any cryptocurrency over a 1–365 day window, identified by CoinGecko coin ID.","exampleAgentPrompt":"Pull 30-day daily OHLC candlestick data for Bitcoin (coin ID: bitcoin) in USD from CoinGecko so I can chart the price action.","exampleUseCases":null,"resultDescription":"An array of OHLC candles, each containing a timestamp plus open, high, low, and close price values in the requested currency, covering the specified number of days — ready for charting libraries or technical analysis.","failureModes":["Invalid coin ID returns an error or empty response — check CoinGecko coin slug spelling","Unsupported 'days' value (not one of 1, 7, 14, 30, 90, 180, 365) may return an error or unexpected data","Invalid vs_currency code returns an error — use standard ISO 4217 codes like 'usd' or 'eur'","Payment failure (x402) if USDC balance is insufficient — endpoint costs $0.005 per call","Rate limiting if too many requests are made in a short period"],"whenToPreferThis":"Choose this endpoint when you need structured OHLC candlestick price data for charting or technical analysis over a multi-day window. Prefer it over a simple spot price endpoint when historical daily open/high/low/close values are needed, and over a generic historical endpoint when chart-ready candle format is required. Ideal for feeding trading dashboards, backtesting, or visualizing price action.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T06:42:18.689Z","isFirstParty":false,"canonicalSlug":"coingecko-ohlc-candlestick-data-b3519d92"}