{"uid":"cap_M7ofRe2dPm3d7ZYt7Q3hk","slug":"coinbase-orderbook-candles-7fd14da0","name":"Coinbase Orderbook Candles","description":"Coinbase Exchange OHLCV candles for one product (e.g. BTC-USD) at 1m, 5m, 15m, 1h, 6h or 1d granularity, plus the current best bid and ask. Latest candles only (Coinbase returns up to 300 per call).","url":"https://api.chainmarket-api.workers.dev/api/finance/coinbase-orderbook-candles?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":["product"],"properties":{"limit":{"type":"string","description":"How many candles, 1 to 100 (default 10)"},"product":{"type":"string","description":"Coinbase product id, e.g. BTC-USD, ETH-EUR"},"granularity":{"type":"string","description":"Seconds per candle: 60, 300, 900, 3600, 21600 or 86400 (default 86400)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"source":"https://api.exchange.coinbase.com/products/BTC-USD/candles","bestAsk":81526.55,"bestBid":81526.54,"candles":[{"low":81003.71,"high":81919.62,"open":81305.9,"time":"2026-10-23T00:00:00.000Z","close":81520.79,"volume":1113.35399285},{"low":80789.61,"high":84305.25,"open":84024.67,"time":"2026-10-22T00:00:00.000Z","close":81307.16,"volume":7277.26547644}],"product":"BTC-USD","checkedAt":"2026-10-23T09:36:16.940Z","granularitySeconds":86400}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-ycpHdACuQi3ciC_rHz3i","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches OHLCV candlestick price data and current best bid/ask for a Coinbase product pair (e.g. BTC-USD) at configurable granularities","exampleAgentPrompt":"Pull the last 10 daily candles for BTC-USD from Coinbase — I want to see the open, high, low, close, volume, and current best bid and ask.","exampleUseCases":[{"title":"Crypto trading signal analysis","prompt":"Get me the last 20 one-hour candles for ETH-USD on Coinbase so I can check for a breakout pattern."},{"title":"Portfolio price monitoring","prompt":"What's the current best bid and ask for BTC-USD on Coinbase, along with the last 5 daily candles?"},{"title":"Multi-timeframe market research","prompt":"Fetch 100 five-minute candles for SOL-USD from Coinbase — I'm building a short-term price chart."}],"resultDescription":"A JSON object containing the source URL, best ask price, best bid price, an array of OHLCV candle objects (each with low, high, open, close, volume, and UTC timestamp), the product pair, the timestamp the data was checked, and the granularity in seconds.","failureModes":["Invalid product id returns an error (e.g. unsupported trading pair)","Granularity value not in allowed set (60, 300, 900, 3600, 21600, 86400) returns error","Limit out of range (must be 1–100) returns error","Payment failure (insufficient USDC balance) — call is not charged","Upstream Coinbase API unavailability causes timeout or error"],"whenToPreferThis":"Use this endpoint when you need structured OHLCV candlestick data and live bid/ask spread for a Coinbase-listed trading pair without requiring an API key or account signup, and you want to pay per call with USDC via x402. Prefer this over self-managed Coinbase API integrations when you need zero-auth, agent-friendly crypto market data on demand.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T12:45:15.729Z","isFirstParty":false,"canonicalSlug":"coinbase-orderbook-candles-7fd14da0"}