{"uid":"cap_ISZucb6J_alq8XVX9Ye8L","slug":"onesource-deepstate-ohlcv-candles-50180eeb","name":"OneSource Deepstate OHLCV Candles","description":"Deepstate, the on-chain order-book exchange on Robinhood Chain. OHLCV candles for a market.","url":"https://api.onesource.io/deepstate/v1/candles/:book","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"},"pathParams":{"type":"object","required":["book"],"properties":{"book":{"type":"string"}}},"queryParams":{"type":"object","required":["tf"],"properties":{"tf":{"enum":["1m","5m","15m","30m","1h","4h","1d","1w"],"type":"string"},"to":{"type":"string"},"from":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"tf":{"type":"string"},"book_id":{"type":"string"},"candles":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"trades":{"type":"integer"},"low_raw":{"type":"string"},"high_raw":{"type":"string"},"open_raw":{"type":"string"},"close_raw":{"type":"string"},"open_bucket":{"type":"boolean"},"market_session":{"type":"string"},"volume_base_raw":{"type":"string"},"volume_quote_raw":{"type":"string"}}}},"book_slug":{"type":"string"},"base_token":{"type":"object","properties":{"symbol":{"type":"string"},"address":{"type":"string"},"decimals":{"type":"integer"}}},"book_label":{"type":"string"},"quote_token":{"type":"object","properties":{"symbol":{"type":"string"},"address":{"type":"string"},"decimals":{"type":"integer"}}}},"description":"Endpoint-specific response payload"}}}}},"responseSchema":null,"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_8nFf56dc5KYoMe7l1A-EY","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":"Fetches OHLCV (open, high, low, close, volume) candlestick data for a specified trading book/market at a given timeframe","exampleAgentPrompt":"Can you pull the 1-hour OHLCV candles for the ETH-USDC book from OneSource Deepstate, covering the last 7 days?","exampleUseCases":[{"title":"Technical analysis chart data","prompt":"Get me the 15-minute candles for the BTC-USDC market on OneSource Deepstate for the past 24 hours so I can run a moving average analysis."},{"title":"Daily price history for portfolio tracking","prompt":"Fetch the daily OHLCV candles for the ETH-USDC book going from January 1st to March 31st — I want to track how the price moved each day over that quarter."},{"title":"Real-time trading signal monitoring","prompt":"Pull the 5-minute candles for the SOL-USDC market on OneSource Deepstate for the last hour — I need the open, close, high, low, and volume for each candle to check for breakout signals."}],"resultDescription":"Returns an array of OHLCV candlesticks for the specified market book and timeframe, each containing timestamp, open/high/low/close prices (as raw strings), trade count, volume in both base and quote tokens, market session label, and open_bucket flag. Also includes metadata about the book (book_id, book_slug, book_label) and token details (symbol, address, decimals) for both base and quote tokens.","failureModes":["Invalid or unknown book identifier returns an error or empty response","Missing required 'tf' (timeframe) query parameter causes a 400 error","Invalid timeframe value outside the allowed enum causes a 400 error","Invalid 'from' or 'to' timestamp format may cause parsing errors","No candles available for the requested time range returns an empty candles array","Payment failure or insufficient USDC balance (x402) prevents the request from completing"],"whenToPreferThis":"Use this endpoint when you need structured OHLCV candlestick data for a specific market book on the OneSource Deepstate platform, especially for DeFi/DEX markets that may not appear on centralized exchange APIs. Prefer this over generic market data providers when you need raw on-chain price data with trade counts, market session context, and token contract metadata bundled alongside candles. Ideal for agents doing technical analysis, backtesting, or real-time signal detection on decentralized markets.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:47:33.380Z","isFirstParty":false}