{"uid":"cap_RN0fuHQ4mYOpUSQSjlv3B","slug":"crypto-price-history-ohlc-aaf30e24","name":"Crypto Price History (OHLC)","description":"","url":"https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/crypto/history","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":[],"properties":{"coin":{"type":"string","default":"bitcoin","description":"CoinGecko id or common ticker (e.g. bitcoin, eth, sol)."},"days":{"enum":[1,7,14,30,90,180,365],"type":"integer","default":7,"description":"History window in days."},"vsCurrency":{"type":"string","default":"usd"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["machine","route","candles"],"properties":{"coin":{"type":"string"},"days":{"type":"integer"},"count":{"type":"integer"},"route":{"type":"string"},"candles":{"type":"array","items":{"type":"object","properties":{"low":{"type":["number","null"]},"high":{"type":["number","null"]},"open":{"type":["number","null"]},"time":{"type":["string","null"]},"close":{"type":["number","null"]}}}},"machine":{"type":"string"},"economics":{"type":"object","properties":{"sellPriceUsd":{"type":"number"},"upstreamCostUsdActual":{"type":["number","null"]}}},"vsCurrency":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SQ5Ogg9qDofDiKcwwVicn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical OHLC candlestick data for a cryptocurrency over a specified window of days (1–365), with ISO timestamps, for charting and technical analysis.","exampleAgentPrompt":"Can you pull the 30-day OHLC candlestick history for Ethereum in USD so I can chart its price trend?","exampleUseCases":[{"title":"Backtesting a crypto trading strategy","prompt":"Fetch the 90-day OHLC candle data for Bitcoin in USD — I need the open, high, low, and close prices with timestamps to backtest my moving average strategy."},{"title":"Spotting a recent price trend for a report","prompt":"Get me the 7-day price candles for Solana in USD so I can see how it's been trending this past week and include it in my market recap."},{"title":"Charting altcoin performance over a year","prompt":"Pull the full 365-day OHLC history for Cardano in USD — I want to chart its yearly performance and identify any major swing highs or lows."}],"resultDescription":"Returns a list of OHLC candlestick objects, each containing an ISO timestamp and open, high, low, and close prices for the specified cryptocurrency and time window, denominated in the requested vs-currency (default USD).","failureModes":["Invalid coin id or ticker returns an error or empty result","Days value not in allowed enum (1,7,14,30,90,180,365) causes a validation error","Unsupported vsCurrency may return an error or empty data","Rate limiting or payment failure returns a 402 or 429 response","Network timeout from upstream CoinGecko data source"],"whenToPreferThis":"Choose this endpoint when you need structured OHLC candlestick data (open/high/low/close with timestamps) for a specific cryptocurrency over a fixed window for charting, technical analysis, or backtesting — as opposed to live spot prices, market cap time series, or volume data which are served by sibling endpoints.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:33:28.867Z","isFirstParty":false}