{"uid":"cap_YiszUDJrduzoLGPrPIIMU","slug":"crypto-ohlc-candlestick-data-api-feb3a2b2","name":"Crypto OHLC Candlestick Data API","description":"Pay-per-request crypto &amp; stock market data for AI agents and developers, settled in USDC on Base via x402.","url":"https://market-data-x402-5wh8-ivory.vercel.app/api/crypto/ohlc","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["id","days"],"properties":{"id":{"type":"string"},"days":{"enum":["1","7","14","30","90","180","365","max"],"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"id":"bitcoin","candles":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","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.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kurO-76cXb0OM8TCst_LY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns OHLC (open/high/low/close) candlestick price data for a cryptocurrency over a specified time period","exampleAgentPrompt":"Can you pull the OHLC candlestick data for Bitcoin over the last 30 days so I can analyze the price trend?","exampleUseCases":[{"title":"Technical analysis for trading bot","prompt":"Get me the OHLC candle data for Ethereum for the past 90 days — I want to run a moving average crossover strategy on it."},{"title":"Crypto portfolio performance review","prompt":"Fetch the last 7 days of OHLC price candles for Solana so I can see how volatile it's been this week."},{"title":"Long-term price trend research","prompt":"Pull the full historical OHLC candlestick data for Bitcoin — use 'max' as the time range — I'm building a long-term price chart."}],"resultDescription":"A JSON object containing the cryptocurrency ID and an array of OHLC candles, where each candle represents open, high, low, and close prices for a time interval within the requested period.","failureModes":["Invalid cryptocurrency ID returns empty candles array or error","Unsupported 'days' value outside the allowed enum causes validation error","Payment not provided or insufficient USDC results in HTTP 402 Payment Required","Network or upstream data provider outage may return 5xx error","Missing required query parameters 'id' or 'days' causes 400 Bad Request"],"whenToPreferThis":"Choose this endpoint when you need structured OHLC candlestick price data for cryptocurrencies for charting or technical analysis, especially when you require historical data across standard time windows (1, 7, 14, 30, 90, 180, 365 days, or max). It is well-suited for agents automating trading strategies, portfolio analytics dashboards, or financial research workflows that consume candle-format price data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:37:37.432Z","isFirstParty":false}