{"uid":"cap_vJZcXq87aTKernZ7G5AXR","slug":"x402-crypto-apis-coinbase-market-data-via-x402-micropayments-441fdf4b","name":"x402 Crypto APIs – Coinbase Market Data (via x402 Micropayments)","description":"Paid cryptocurrency API endpoints via x402 micropayments","url":"https://x402-crypto.vercel.app/api/coinbase/%7Bpath%7D","method":"POST","headers":{},"bodySchema":{"type":"object","required":["query"],"properties":{"end":{"type":"string","description":"End time for historical data (ISO 8601)"},"query":{"type":"string","description":"Product ID or symbol (e.g. BTC-USD)"},"start":{"type":"string","description":"Start time for historical data (ISO 8601)"},"granularity":{"type":"string","description":"Candle granularity (e.g. 3600, 86400)"}}},"responseSchema":{"type":"object","properties":{"data":{"type":"object","description":"Response payload from the upstream API (structure varies by endpoint)"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.107667","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.107667/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.107667","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.107667","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_V_vF6e-NwoDbBO-jf2pEG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.107667","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches cryptocurrency market data (prices, candles, historical OHLCV) for a given product pair via Coinbase, paid per-call using x402 micropayments","exampleAgentPrompt":"Can you pull hourly candlestick data for BTC-USD from Coinbase from January 1, 2024 to January 31, 2024, using a granularity of 3600 seconds?","exampleUseCases":[{"title":"Crypto trading strategy backtesting","prompt":"Get me daily OHLCV candles for ETH-USD from Coinbase for all of 2023 — start January 1st and end December 31st, granularity 86400 — so I can backtest a moving average strategy."},{"title":"Real-time crypto price snapshot","prompt":"What's the latest price data for SOL-USD from Coinbase right now? Just query the current candle for SOL-USD with a 3600 granularity."},{"title":"Portfolio performance analysis","prompt":"I need hourly price candles for BTC-USD and MATIC-USD from Coinbase for the past 7 days — start from October 1, 2024 and end October 7, 2024, granularity 3600 — to calculate my portfolio's performance."}],"resultDescription":"Returns a JSON object with a 'data' field containing the upstream Coinbase API response — typically an array of OHLCV candlestick records for the requested product and time range, including open, high, low, close, and volume values per candle interval.","failureModes":["Invalid product ID returns an error or empty data (e.g. typo in BTC-USD)","Invalid ISO 8601 date format causes a request failure","Granularity value not supported by Coinbase returns an error","Time range too large may be truncated or rejected","Payment failure via x402 results in a 402 response before data is returned","Missing required 'query' field returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need historical or current OHLCV candlestick data for a specific Coinbase-listed cryptocurrency trading pair, especially when you want to pay per-call with no subscription using x402 micropayments. Prefer this over scraping or free-tier APIs when you need reliable, Coinbase-sourced market data with flexible granularity for trading analysis or backtesting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:46:38.476Z","isFirstParty":false}