# StableFinance Historical OHLCV Price Bars

> StableFinance Historical OHLCV Price Bars is a paid API for AI agents from stablefinance.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns historical OHLCV (open, high, low, close, volume) price bars for a US stock over a specified date range and interval.

## Facts

- Endpoint: GET https://stablefinance.dev/api/prices
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablefinance-dev-05f2b019
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kW5XToF_q9EZRePqsFRk8

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 stablefinance-dev-05f2b019
```

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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Historical OHLCV bars for a US stock. Required: ticker, interval (day|week|month|year), start_date (YYYY-MM-DD), end_date (YYYY-MM-DD).

## Output

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.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "ticker": "AAPL",
   "end_date": "2023-12-31",
   "interval": "day",
   "start_date": "2023-01-01"
  }
 }
}
```

## 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",
     "$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
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "prices": [
   {
    "low": 183.89,
    "high": 188.44,
    "open": 187.15,
    "time": "2024-01-02",
    "close": 185.64,
    "volume": 82488700
   }
  ],
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablefinance-dev-05f2b019/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablefinance.dev](https://www.zero.xyz/host/stablefinance.dev/llms.txt)
