# Stock Price History (OHLC) API
> Live historical daily prices (OHLC) for US stocks from Nasdaq — no key, nothing stored. The price-history-and-charting view of a stock: the daily open, high, low, close and volume going back months or years, distinct from the live-quote, movers, earnings and analyst APIs in the catalogue. The history endpoint returns the daily OHLC time series over a chosen range — 1 month to 5 years, or explicit from/to dates — ready to plot or backtest. The stats endpoint computes the period statistics from that series: the period high and low, the latest close, the total return over the period, the average daily volume and the annualised volatility (from daily log returns). Build charting widgets, backtesting tools, technical-analysis pipelines, performance trackers and risk models on top of real Nasdaq price history. Look up any US stock by its ticker (symbol=AAPL) and a range (1m, 3m, 6m, 1y, 2y, 5y) or explicit from=YYYY-MM-DD and to=YYYY-MM-DD; prices and volumes are returned as clean numbers.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/stockhistory-api/..."
```

## Pricing
- **Free** (Free) — 12,200 calls/Mo, 3 req/s
- **Starter** ($8/Mo) — 188,000 calls/Mo, 10 req/s
- **Pro** ($25/Mo) — 795,000 calls/Mo, 28 req/s
- **Scale** ($56/Mo) — 2,840,000 calls/Mo, 60 req/s

## Endpoints

### History

#### `GET /v1/history` — Daily OHLC time series

**Parameters:**
- `symbol` (query, required, string) — Stock ticker Example: `AAPL`
- `range` (query, optional, string) — 1m, 3m, 6m, 1y, 2y, 5y (default 1y) Example: `1y`
- `from` (query, optional, string) — Start date YYYY-MM-DD (with to) Example: `2026-01-01`
- `to` (query, optional, string) — End date YYYY-MM-DD Example: `2026-03-01`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stockhistory-api/v1/history?symbol=AAPL&range=1y&from=2026-01-01&to=2026-03-01"
```

### Stats

#### `GET /v1/stats` — Period statistics from the history

**Parameters:**
- `symbol` (query, required, string) — Stock ticker Example: `AAPL`
- `range` (query, optional, string) — Range (default 1y) Example: `1y`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stockhistory-api/v1/stats?symbol=AAPL&range=1y"
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stockhistory-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/stockhistory-api
OpenAPI spec: https://www.oanor.com/api/stockhistory-api/openapi.json
