# Financial Datasets Historical Stock Prices

> Financial Datasets Historical Stock Prices is a paid API for AI agents from api.financialdatasets.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-27).

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.

## Facts

- Endpoint: GET https://api.financialdatasets.ai/prices?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/financial-datasets-historical-stock-prices-7b13d18a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HdmltKqQKfEMo33Q2Khka

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability financial-datasets-historical-stock-prices-7b13d18a
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/financial-datasets-historical-stock-prices-7b13d18a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.financialdatasets.ai](https://www.zero.xyz/host/api.financialdatasets.ai/llms.txt)
