# ATR & Volatility Stops API
> Live Average True Range and volatility-stop analytics that traders run to size stops to market noise, computed on demand from the OHLC candles you pass in — no key, no cache, nothing stored. The atr endpoint returns the Average True Range using Wilder's smoothing, its value as a percent of price, and the latest true range — the single number that tells you how much an instrument typically moves. The stops endpoint returns ATR-based stop levels: the Chandelier Exit for a long and for a short (highest high or lowest low offset by a multiple of ATR) and, if you pass an entry price, an ATR trailing stop with its distance in money and percent. The keltner endpoint returns the Keltner Channel — an EMA mid-line with ATR-scaled upper and lower bands — and where the last price sits. Because true range needs the full high, low and close, this is a different tool from closes-only indicator APIs and from single-coin volatility feeds: you supply the candles for any market — forex, stocks, crypto or commodities. Computed locally and deterministically, so it is instant and private. Ideal for stop placement, position sizing, breakout filters and risk dashboards. ATR uses Wilder's smoothing. Live, nothing stored. 3 compute endpoints. For closes-only indicators like RSI or MACD use a technical-indicators API.

## 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/atr-api/..."
```

## Pricing
- **Free** (Free) — 4,700 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 91,500 calls/Mo, 6 req/s
- **Pro** ($20/Mo) — 475,000 calls/Mo, 18 req/s
- **Business** ($46/Mo) — 2,910,000 calls/Mo, 45 req/s

## Endpoints

### ATR

#### `GET /v1/atr` — Average True Range + ATR%

**Parameters:**
- `candles` (query, required, string) — OHLC candles open:high:low:close, comma-separated oldest first Example: `100:102:99:101,101:104:100:103,103:105:101:102,102:104:100:101,101:103:99:100,100:103:99:102,102:105:101:104,104:106:102:103,103:105:101:104,104:107:103:106,106:108:104:105,105:107:103:104,104:106:102:105,105:108:104:107,107:109:105:106,106:108:104:107`
- `period` (query, optional, string) — ATR period (default 14) Example: `14`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atr-api/v1/atr?candles=100%3A102%3A99%3A101%2C101%3A104%3A100%3A103%2C103%3A105%3A101%3A102%2C102%3A104%3A100%3A101%2C101%3A103%3A99%3A100%2C100%3A103%3A99%3A102%2C102%3A105%3A101%3A104%2C104%3A106%3A102%3A103%2C103%3A105%3A101%3A104%2C104%3A107%3A103%3A106%2C106%3A108%3A104%3A105%2C105%3A107%3A103%3A104%2C104%3A106%3A102%3A105%2C105%3A108%3A104%3A107%2C107%3A109%3A105%3A106%2C106%3A108%3A104%3A107&period=14"
```

#### `GET /v1/keltner` — Keltner Channel — EMA mid with ATR bands

**Parameters:**
- `candles` (query, required, string) — OHLC candles open:high:low:close Example: `100:102:99:101,101:104:100:103,103:105:101:102,102:104:100:101,101:103:99:100,100:103:99:102,102:105:101:104,104:106:102:103,103:105:101:104,104:107:103:106,106:108:104:105,105:107:103:104,104:106:102:105,105:108:104:107,107:109:105:106,106:108:104:107`
- `period` (query, optional, string) — Period (default 14) Example: `14`
- `multiplier` (query, optional, string) — ATR multiplier (default 2) Example: `2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atr-api/v1/keltner?candles=100%3A102%3A99%3A101%2C101%3A104%3A100%3A103%2C103%3A105%3A101%3A102%2C102%3A104%3A100%3A101%2C101%3A103%3A99%3A100%2C100%3A103%3A99%3A102%2C102%3A105%3A101%3A104%2C104%3A106%3A102%3A103%2C103%3A105%3A101%3A104%2C104%3A107%3A103%3A106%2C106%3A108%3A104%3A105%2C105%3A107%3A103%3A104%2C104%3A106%3A102%3A105%2C105%3A108%3A104%3A107%2C107%3A109%3A105%3A106%2C106%3A108%3A104%3A107&period=14&multiplier=2"
```

#### `GET /v1/stops` — Chandelier Exit + ATR trailing stop

**Parameters:**
- `candles` (query, required, string) — OHLC candles open:high:low:close Example: `100:102:99:101,101:104:100:103,103:105:101:102,102:104:100:101,101:103:99:100,100:103:99:102,102:105:101:104,104:106:102:103,103:105:101:104,104:107:103:106,106:108:104:105,105:107:103:104,104:106:102:105,105:108:104:107,107:109:105:106,106:108:104:107`
- `period` (query, optional, string) — ATR period (default 14) Example: `14`
- `multiplier` (query, optional, string) — ATR multiplier (default 3) Example: `3`
- `entry` (query, optional, string) — Entry price for a trailing stop Example: `107`
- `side` (query, optional, string) — long or short (default long) Example: `long`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atr-api/v1/stops?candles=100%3A102%3A99%3A101%2C101%3A104%3A100%3A103%2C103%3A105%3A101%3A102%2C102%3A104%3A100%3A101%2C101%3A103%3A99%3A100%2C100%3A103%3A99%3A102%2C102%3A105%3A101%3A104%2C104%3A106%3A102%3A103%2C103%3A105%3A101%3A104%2C104%3A107%3A103%3A106%2C106%3A108%3A104%3A105%2C105%3A107%3A103%3A104%2C104%3A106%3A102%3A105%2C105%3A108%3A104%3A107%2C107%3A109%3A105%3A106%2C106%3A108%3A104%3A107&period=14&multiplier=3&entry=107&side=long"
```

### Meta

#### `GET /v1/meta` — Spec

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


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