{"uid":"cap_eqxX_3n3_UnZKCZEJ4aEE","slug":"blockrun-us-stock-ohlc-historical-bars-53ea4409","name":"BlockRun US Stock OHLC Historical Bars","description":"US Stock OHLC bars for BABA @ D","url":"https://blockrun-web-vbsbhh7lea-uc.a.run.app/api/v1/stocks/us/history/BABA","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","properties":{"path":{"type":"object","required":["symbol"],"properties":{"symbol":{"type":"string","example":"AAPL","description":"NYSE/Nasdaq/AMEX ticker (AAPL, TSLA, NVDA, CRCL, SPY, …)."}}},"query":{"type":"object","required":["from","to"],"properties":{"to":{"type":"integer","description":"Window end (Unix seconds)."},"from":{"type":"integer","description":"Window start (Unix seconds)."},"session":{"enum":["pre","post","on"],"type":"string","description":"Optional US market session."},"resolution":{"enum":["1","5","15","60","240","D","W","M"],"type":"string","default":"D","description":"Bar resolution (TradingView convention): 1/5/15/60/240 min, D day, W week, M month."}}}}},"output":{"type":"object","required":["symbol","resolution","bars","source"],"properties":{"to":{"type":"integer"},"bars":{"type":"array","items":{"type":"object","required":["t","o","h","l","c","v"],"properties":{"c":{"type":"number","description":"Close"},"h":{"type":"number","description":"High"},"l":{"type":"number","description":"Low"},"o":{"type":"number","description":"Open"},"t":{"type":"integer","description":"Bar start (Unix seconds)"},"v":{"type":"number","description":"Volume"}}}},"from":{"type":"integer"},"source":{"type":"string","const":"pyth"},"symbol":{"type":"string","example":"AAPL"},"resolution":{"type":"string","example":"D"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.001/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_bEE6SwdkcD7UBrhbwUfi7","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":"Returns OHLC (Open, High, Low, Close, Volume) bar history for a US-listed stock ticker over a specified time window and resolution","exampleAgentPrompt":"Pull daily OHLC bars for BABA from January 1 2024 to June 30 2024 using the BlockRun stock history API — I need the open, high, low, close, and volume for each day.","exampleUseCases":[{"title":"Backtest moving average strategy","prompt":"Fetch 6 months of daily OHLC bars for AAPL from July 1 2023 to December 31 2023 — I want to backtest a 50-day moving average crossover strategy and need the open, high, low, close, and volume for each day."},{"title":"Chart intraday price swings","prompt":"Pull 1-hour OHLC bars for TSLA for the past two weeks — I'm building an intraday candlestick chart and need the open, high, low, close, and volume at hourly resolution."},{"title":"Analyze weekly trend for earnings","prompt":"Get weekly OHLC bars for NVDA covering the last 12 months leading up to its most recent earnings date — I want to spot price trends and volume spikes in the weeks before and after each earnings report."}],"resultDescription":"Returns a JSON object containing an array of OHLC bar objects, each with timestamp (Unix seconds), open, high, low, close, and volume fields, along with the symbol, resolution, source (pyth), and the effective from/to window.","failureModes":["Invalid or unsupported ticker symbol returns an error","from/to timestamps out of range or reversed returns empty bars array or error","Unsupported resolution value returns a validation error","Missing required query parameters (from, to) returns a 400-level error","Payment not attached or insufficient USDC balance triggers a 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need structured OHLC candlestick bar history for a US-listed equity (NYSE/Nasdaq/AMEX) with flexible resolution from 1-minute to monthly, sourced from Pyth Network. Prefer this over real-time price endpoints when you need historical time-series data for charting, backtesting, or trend analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:32.213Z","isFirstParty":false}