{"uid":"cap_YbVfxlzu6QttThApA20Bq","slug":"tradeos-get-market-candles-6a73f1a4","name":"TradeOS Get Market Candles","description":"Retrieve historical OHLCV candles for an instrument or two-ticker spread. Returns up to 1000 bars per paid request, with UTC timestamps in seconds and data-delay information. Use search_tickers to find a ticker, get_market_snapshot for its latest market data, and get_market_technical_analysis for chart analysis of the same ticker. Popular examples include AAPL, SPY, gold XAUUSD (C:XAUUSD), EURUSD (C:EURUSD), BTCUSD (X:BTCUSD), and ETHUSD (X:ETHUSD). FX/metals require C:; crypto requires X:.","url":"https://ai.tradeos.xyz/api/x402/get_market_candles?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"limit":{"type":"integer","default":100,"maximum":1000,"minimum":1},"ticker":{"type":"string","pattern":"^[A-Za-z0-9._:]{1,64}(?:\\s*[/-]\\s*[A-Za-z0-9._:]{1,64})?$","description":"AAPL, C:EURUSD, X:BTCUSD, or a two-ticker ratio/difference"},"endTime":{"type":"integer","maximum":9999999999,"description":"Exclusive UTC Unix timestamp in seconds; defaults to now","exclusiveMinimum":0},"interval":{"enum":["1","5","15","30","60","240","1D","1W","4W","1m","5m","15m","30m","1h","4h"],"type":"string"},"startTime":{"type":"integer","maximum":9999999999,"minimum":0,"description":"Inclusive UTC Unix timestamp in seconds"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0RwVAzUnUItchVaUWF97A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieve historical OHLCV (open/high/low/close/volume) candlestick data for a stock, ETF, forex pair, commodity, or crypto ticker — including two-ticker spreads.","exampleAgentPrompt":"Pull the last 200 daily OHLCV candles for BTCUSD (X:BTCUSD) on TradeOS, going back from now.","exampleUseCases":[{"title":"Crypto momentum strategy backtest","prompt":"Fetch 1000 hourly candles for X:ETHUSD ending right now so I can backtest a momentum strategy on Ethereum."},{"title":"Gold price trend research","prompt":"Get me 90 days of daily candlestick data for gold (C:XAUUSD) so I can see how the price has trended over the last quarter."},{"title":"Stock spread pair trading analysis","prompt":"Pull 500 daily bars for the AAPL/MSFT ratio spread so I can analyze the historical relationship between the two stocks."}],"resultDescription":"Returns up to 1000 OHLCV bars for the requested instrument or two-ticker spread. Each bar includes open, high, low, close, and volume values with a UTC Unix timestamp in seconds, plus data-delay information indicating how fresh the data is.","failureModes":["Invalid ticker format — FX/metals must use C: prefix, crypto must use X: prefix","startTime or endTime out of valid range (exceeds 9999999999 or negative)","Limit exceeds 1000 or is below 1","Unsupported interval value not in allowed enum","Ticker not found or no data for specified time range","Payment failure — $0.02 USDC not provided or rejected"],"whenToPreferThis":"Use this endpoint when you need historical price bars (OHLCV) for backtesting, charting, or time-series analysis across equities, ETFs, forex, metals, or crypto. It supports two-ticker spread queries which is rare. Pair with get_market_snapshot for the latest price and get_market_technical_analysis for pre-computed chart signals. Prefer this over snapshot endpoints when you need multiple historical bars rather than a single current price.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:33:26.381Z","isFirstParty":false,"canonicalSlug":"tradeos-get-market-candles-6a73f1a4"}