{"uid":"cap_N6ZUmvV0tu0KeXCyS3h8S","slug":"agent402-tools-stock-history-ohlcv-bars-21013773","name":"agent402.tools Stock History OHLCV Bars","description":"Historical OHLCV bars for a symbol. Configurable interval (1m, 5m, 15m, 30m, 60m, 1d, 1wk, 1mo, 3mo) and range (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max). Intraday intervals are limited by Yahoo to ~60 days of data. Returns a flat array of bars (time, open, high, low, close, volume) ready for charting or backtests.","url":"https://agent402.tools/api/stock-history","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":["symbol"],"properties":{"range":{"type":"string","description":"History window: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max (default 1mo)"},"symbol":{"type":"string","description":"Ticker symbol"},"interval":{"type":"string","description":"Bar size: 1m, 5m, 15m, 30m, 60m, 1d, 1wk, 1mo, 3mo (default 1d)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["symbol","interval","range","currency","timezone","bars","count"],"properties":{"bars":{"type":"array","items":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"open":{"type":"number"},"time":{"type":"string"},"close":{"type":"number"},"volume":{"type":"integer"}}}},"count":{"type":"integer"},"range":{"type":"string"},"symbol":{"type":"string"},"currency":{"type":"string"},"interval":{"type":"string"},"timezone":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"bars":[{"low":217.65,"high":220.3,"open":218.2,"time":"2026-05-20T13:30:00Z","close":219.8,"volume":48123456}],"count":1,"range":"1mo","symbol":"AAPL","currency":"USD","interval":"1d","timezone":"America/New_York"}},"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_0qKNlwWp2BtpnXeR1NEnR","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":"Returns historical OHLCV (open, high, low, close, volume) price bars for a stock ticker at configurable intervals and date ranges, ready for charting or backtesting.","exampleAgentPrompt":"Pull the daily OHLCV bars for NVDA over the past 6 months so I can chart them and run a backtest.","exampleUseCases":null,"resultDescription":"A flat array of bar objects each containing time, open, high, low, close, and volume fields for the requested symbol, interval, and range — suitable for direct use in charting libraries or quantitative backtests.","failureModes":["Invalid or unknown ticker symbol returns an error or empty array","Intraday intervals (1m–60m) requested for ranges beyond ~60 days return truncated or no data due to Yahoo Finance limits","Missing required 'symbol' query parameter returns a validation error","Unsupported interval or range value returns a 400 bad request","Network or upstream Yahoo Finance outage may cause 5xx errors"],"whenToPreferThis":"Use this endpoint when you need structured OHLCV candlestick data for US stocks, ETFs, or indices at a specific granularity (from 1-minute to monthly) and a defined historical window. Prefer this over a live quote endpoint when you need multiple historical data points for charting, backtesting, or technical analysis. Note that intraday data is capped at ~60 days by the upstream provider.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:06.935Z","isFirstParty":false}