# Stooq Historical Stock Prices

> Stooq Historical Stock Prices is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Fetches historical OHLCV (open, high, low, close, volume) price data for US stocks, ETFs, or indexes from Stooq via a pay-per-call API requiring no signup.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/finance/stooq-historical-stocks?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stooq-historical-stock-prices-a59687d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0Lw1uJJ6M8wdKGUUQ2ook

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 stooq-historical-stock-prices-a59687d8
```

Example prompt: Pull the daily OHLCV price history for AAPL stock from October 1st to October 20th 2026, up to 50 rows.

## When to prefer this

Choose this endpoint when you need daily historical OHLCV price data for US-listed stocks, ETFs, or market indexes without requiring an API key or subscription. It is ideal for pay-per-call agent workflows, backtesting, charting, or performance analysis where you need flexible date ranges and row limits. Prefer alternatives if you need real-time tick data, intraday data, options data, or non-US market coverage.

## Known failure modes

- Invalid or unrecognized ticker symbol returns no data or an error
- Date range outside available history returns empty prices array
- Limit exceeds 1000 is clamped or rejected
- Missing required symbol parameter returns a validation error
- Payment failure (x402) results in no charge and no data returned
- Network or upstream Stooq outage may cause temporary unavailability

## How this service works

Daily historical prices for a US stock, ETF or index: date, open, high, low, close and volume, newest first, for any date range up to 10 years back (max 1,000 rows per call). Data from Nasdaq.com's public historical quotes API (Stooq blocks automated downloads).

## Output

A JSON object containing the ticker symbol, date range queried, a list of daily price records (each with date, open, high, low, close, and volume), the total number of records returned, a link to the source (e.g. Nasdaq historical page), and a checkedAt timestamp.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "symbol"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "End date YYYY-MM-DD (default today)"
      },
      "from": {
       "type": "string",
       "description": "Start date YYYY-MM-DD (default 30 days ago)"
      },
      "limit": {
       "type": "string",
       "description": "Rows, 1 to 1000 (default 100)"
      },
      "symbol": {
       "type": "string",
       "description": "US ticker, e.g. AAPL, SPY"
      },
      "assetClass": {
       "type": "string",
       "description": "stock (default), etf or index"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "2026-10-20",
  "from": "2026-10-01",
  "prices": [
   {
    "low": 338.7,
    "date": "2026-10-20",
    "high": 343.06,
    "open": 339.86,
    "close": 339.5,
    "volume": 35851380
   },
   {
    "low": 340.115,
    "date": "2026-10-19",
    "high": 346,
    "open": 340.775,
    "close": 342.94,
    "volume": 34573180
   }
  ],
  "source": "https://www.nasdaq.com/market-activity/stocks/aapl/historical",
  "symbol": "AAPL",
  "checkedAt": "2026-10-23T09:36:11.085Z",
  "totalRecords": 14
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stooq-historical-stock-prices-a59687d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
