{"uid":"cap_kW5XToF_q9EZRePqsFRk8","slug":"stablefinance-dev-05f2b019","name":"StableFinance Historical OHLCV Price Bars","description":"Historical OHLCV bars for a US stock. Required: ticker, interval (day|week|month|year), start_date (YYYY-MM-DD), end_date (YYYY-MM-DD).","url":"https://stablefinance.dev/api/prices","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"},"queryParams":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ticker","interval","start_date","end_date"],"properties":{"ticker":{"type":"string","minLength":1},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"interval":{"enum":["day","week","month","year"],"type":"string"},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ticker","prices"],"properties":{"prices":{"type":"array","items":{},"description":"OHLCV bars: open, close, high, low, volume, time."},"ticker":{"type":"string"}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"prices":[{"low":183.89,"high":188.44,"open":187.15,"time":"2024-01-02","close":185.64,"volume":82488700}],"ticker":"AAPL"}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"ticker":"AAPL","end_date":"2023-12-31","interval":"day","start_date":"2023-01-01"}}},"response":{"_truncated":true,"_originalSize":16179}},"exampleRequest":{"ticker":"AAPL","end_date":"2023-12-31","interval":"day","start_date":"2023-01-01"},"tags":["x402"],"displayCostAmount":"0.02","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.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_1YkWT-iyn9IdAERta8JGJ","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":"Returns historical OHLCV (open, high, low, close, volume) price bars for a US stock over a specified date range and interval.","exampleAgentPrompt":"Can you pull daily OHLCV price bars for AAPL from 2023-01-01 to 2023-12-31 so I can analyze its price movement last year?","exampleUseCases":null,"resultDescription":"An array of OHLCV bars for the requested ticker and interval, each containing open, high, low, close, volume, and timestamp fields, along with the ticker symbol confirming the query.","failureModes":["Invalid ticker symbol returns an error or empty result","Dates outside supported history range may return empty bars array","Invalid interval enum value returns a validation error","Malformed date format (not YYYY-MM-DD) triggers a 400 error","Missing required parameters (ticker, interval, start_date, end_date) returns a 400 bad request","Payment failure (x402) returns a 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need structured historical price data (OHLCV) for a US stock at daily, weekly, monthly, or yearly granularity, especially for backtesting, charting, or quantitative analysis workflows. Prefer it over live-price endpoints when you need a time series rather than a single current quote.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:45:20.082Z","isFirstParty":false}