# QuantOracle ATR (Average True Range) Indicator

> QuantOracle ATR (Average True Range) Indicator is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes the Average True Range (ATR) volatility indicator for a given price series, returning current ATR value, ATR percentage, ATR series, and volatility regime classification.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/indicators/atr
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-f0d3f537
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_le2l21mFGbg7Boy2y0aFs

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 api-quantoracle-dev-f0d3f537 -d '<json body>'
```

Example prompt: Calculate the 14-period ATR for this stock using the last 5 bars — highs were [152.3, 153.1, 151.8, 154.2, 152.9], lows were [149.8, 150.2, 149.5, 151.5, 150.8], and closes were [151.5, 152.0, 150.9, 153.5, 152.1] — and tell me what volatility regime it's in right now.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call ATR calculation without spinning up your own quant infrastructure. Ideal for agents that need real-time volatility regime classification alongside raw ATR values for position sizing, stop-loss placement, or risk management decisions. Prefer this over general-purpose math APIs when you need the volatility regime label ('LOW'/'MEDIUM'/'HIGH') as part of the response.

## Known failure modes

- Mismatched array lengths for high/low/close series returns a validation error
- Insufficient data points for the requested period (need at least period+1 bars)
- Invalid or non-numeric price values cause computation failure
- Period value of zero or negative returns an error
- Empty price arrays return an error

## How this service works

QuantOracle: indicators/atr

## Output

Returns the current ATR value (e.g. 2.85), ATR as a percentage of price (e.g. 1.87%), the ATR time series array, the period used, and a volatility regime label (e.g. 'MEDIUM', 'HIGH', 'LOW'), plus response latency in milliseconds.

## Example request

```json
{
 "input": {
  "body": {
   "low": [
    149.8,
    150.2,
    149.5,
    151.5,
    150.8,
    151.2,
    151.9,
    151.5,
    152.8,
    152.1,
    153.2,
    153.9,
    153.5,
    154.8,
    154.2
   ],
   "high": [
    152.3,
    153.1,
    151.8,
    154.2,
    152.9,
    153.5,
    154.1,
    153.8,
    155.2,
    154.6,
    155.8,
    156.2,
    155.9,
    157.1,
    156.5
   ],
   "close": [
    151.5,
    152,
    150.9,
    153.5,
    152.1,
    152.8,
    153.2,
    152.9,
    154.5,
    153.8,
    154.9,
    155.6,
    155.2,
    156.4,
    155.8
   ],
   "period": 14
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "low": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Low",
   "description": "Array of low prices"
  },
  "high": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "High",
   "description": "Array of high prices"
  },
  "close": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Close",
   "description": "Array of closing prices"
  },
  "period": {
   "type": "integer",
   "title": "Period",
   "default": 14,
   "description": "ATR lookback period"
  }
 }
}
```

## More

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