{"uid":"cap_HdmltKqQKfEMo33Q2Khka","slug":"financial-datasets-historical-stock-prices-7b13d18a","name":"Financial Datasets Historical Stock Prices","description":"Historical end-of-day stock prices for a US-listed ticker: open, high, low, close and volume per day, week, month or year between start_date and end_date, oldest first. Paginated with next_page_url. Use when an agent needs a price series or a return over a date range. Non-Professional use; Professional use needs a plan at financialdatasets.ai.","url":"https://api.financialdatasets.ai/prices?utm_source=zero.xyz","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","required":["ticker","interval","start_date","end_date"],"properties":{"cursor":{"type":"string","description":"Opaque pagination cursor from a previous response's next_page_url."},"ticker":{"type":"string","description":"The stock ticker symbol (e.g. AAPL, MSFT)."},"end_date":{"type":"string","description":"The end date for the price data (format: YYYY-MM-DD)."},"interval":{"enum":["day","week","month","year"],"type":"string","description":"The time interval for the price data."},"start_date":{"type":"string","description":"The start date for the price data (format: YYYY-MM-DD)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_w_c9EYq1BS1n5bvrY1OXR","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 end-of-day OHLCV (open, high, low, close, volume) price data for a US-listed stock ticker over a specified date range, aggregated by day, week, month, or year.","exampleAgentPrompt":"Can you pull the daily closing prices for AAPL from January 1, 2023 to December 31, 2023 so I can see how the stock performed over the full year?","exampleUseCases":[{"title":"Backtest a stock trading strategy","prompt":"Get me the daily open, high, low, close, and volume data for NVDA from January 1, 2022 through December 31, 2023 — I want to run a momentum backtest on it."},{"title":"Calculate total return over a period","prompt":"What were the weekly closing prices for SPY between January 1, 2020 and January 1, 2024? I want to calculate the total return over those four years."},{"title":"Build a historical price chart","prompt":"Fetch monthly OHLCV prices for TSLA from January 2019 to December 2023 so I can build a long-term price chart."}],"resultDescription":"A paginated list of OHLCV price bars for the requested ticker and interval, sorted oldest-first. Each record includes the date, open, high, low, close prices, and trading volume. If there are more results, a next_page_url is included to retrieve the next page using a cursor parameter.","failureModes":["Invalid or unrecognized ticker symbol returns an error or empty result set","start_date after end_date returns an empty or error response","Unsupported interval value returns a validation error","Missing required parameters (ticker, interval, start_date, end_date) causes a 400 error","Non-Professional use attempting to access data requiring a paid plan may be blocked","Rate limiting or payment failure for x402 micropayment returns a 402 error"],"whenToPreferThis":"Use this endpoint when you need a time series of historical end-of-day prices (OHLCV) for a US-listed stock over a custom date range with flexible interval granularity (daily, weekly, monthly, yearly). It is ideal for backtesting, return calculations, charting, and any analysis requiring price history rather than a real-time snapshot. Prefer this over the real-time price endpoint when historical data or a range of dates is needed. Best for non-professional use cases at $0.02 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T13:01:07.082Z","isFirstParty":false,"canonicalSlug":"financial-datasets-historical-stock-prices-7b13d18a"}