GET/indicator/atr

Average True Range (ATR)

Category: Volatility · Updated November 2026


The TAAPI.IO ATR API returns real-time and historical values for the Average True Range indicator as JSON, for crypto pairs and US stocks. Send an exchange, symbol and timeframe to get real-time or historical data, with no candles to download and no calculations to maintain.

SpecValue
EndpointGET https://v2.taapi.io/indicator/atr
Outputsvalue
MarketsBinance, Binance Futures, Bybit, Gate.io, Kraken and US stocks
Timeframes1m to 1w
DeliveryREST, bulk and WebSocket

Get ATR with one API call

This request returns ATR for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.

curl -G https://v2.taapi.io/indicator/atr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "exchange=binance" \
  --data-urlencode "symbol=BTCUSDT" \
  --data-urlencode "timeframe=1h"

ATR API response

This response came from the live API on 9 November 2026. Long lists are shortened here.

200 OK
{
  "value": [500.2279012682141],
  "timestamp": [1794218400]
}
FieldTypeDescription
valuenumber[]ATR result
timestampinteger[]Unix time of each candle, in seconds

ATR API parameters

NameTypeRequiredDefaultDescription
exchangestringYes—binance, binancefutures, bybit, gateio, kraken or stocks
symbolstringYes—Pair or ticker, e.g. BTCUSDT or AAPL
timeframestringYes—1m 5m 15m 1h 4h 1d 1w
periodintegerNo14Time Period
resultsintegerNo1Number of values to return, or max
backtrackintegerNo0Candles to skip from the most recent

What is ATR?

Average True Range, developed by J. Welles Wilder, measures volatility as the average size of candles, including gaps. It says nothing about direction and is widely used for stop distance and position sizing.

ATR formula

OutputCalculation
True rangemax(high − low, |high − previous close|, |low − previous close|)
ATRWilder's smoothing of true range over the period

How to read ATR in your code

SignalMeaningCondition
Volatility risingCandles getting largervalue rising
Volatility fallingCandles getting smallervalue falling
Stop distanceCommon sizing methodEntry price ± 2 × value

Limitations: ATR is in price units, so compare symbols with NATR. It also lags sudden volatility spikes. Nothing on this page is financial advice.

Why ATR uses true range

A candle's high minus its low misses any gap from the previous close. True range takes the largest of three distances, so a market that jumps overnight still registers as volatile. That matters most for US stocks, which often open away from the prior close, and less for crypto, which trades around the clock.

Wilder then smooths true range over the period, 14 by default, so ATR moves gradually and doesn't fully reflect a sudden spike straight away.

Using ATR for risk

The main use of ATR is scaling decisions to current volatility. A fixed stop of 1% may be too tight in a volatile week and too loose in a quiet one, while a stop at a multiple of ATR adjusts by itself. Sizing positions from that distance keeps the amount at risk similar across markets.

ATR is in the symbol's price units, so a value of 500 on BTC and 5 on another pair can't be compared directly. Use NATR to compare volatility across symbols. SuperTrend and Keltner Channels are both built on ATR.

Calculate an ATR stop and position size with Python

One bulk request fetches the closed price and ATR together. The stop sits two ATRs below the entry, and the size is set so that hitting the stop loses a fixed amount.

curl -X POST https://v2.taapi.io/bulk \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "constructs": [
    {
      "id": "btc",
      "exchange": "binance",
      "symbol": "BTCUSDT",
      "timeframe": "1h",
      "indicators": [
        {
          "id": "price",
          "indicator": "price",
          "backtrack": 1
        },
        {
          "id": "atr",
          "indicator": "atr",
          "period": 14,
          "backtrack": 1
        }
      ]
    }
  ]
}'

Get historical ATR values

Add results to return a series for backtesting or charting. The last element is the most recent candle.

curl -G https://v2.taapi.io/indicator/atr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "exchange=binance" \
  --data-urlencode "symbol=BTCUSDT" \
  --data-urlencode "timeframe=1h" \
  --data-urlencode "results=100"

Get ATR for multiple symbols

Combine ATR with other indicators in one request. Each exchange, symbol and timeframe combination is one construct: Basic allows 1 per request, Pro 3 and Expert 10.

POST/bulk
curl -X POST https://v2.taapi.io/bulk \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "constructs": [
    {
      "id": "btc_1h",
      "exchange": "binance",
      "symbol": "BTCUSDT",
      "timeframe": "1h",
      "indicators": [
        {
          "id": "atr",
          "indicator": "atr"
        },
        {
          "id": "rsi",
          "indicator": "rsi"
        }
      ]
    }
  ]
}'

Stream ATR in real time

Subscribe over WebSocket to receive new values every 5 seconds while the candle is forming. Streaming supports 1m, 5m, 15m and 1h, and uses interval where REST uses timeframe.

WSSwss://v2.taapi.io/streaming
{
  "type": "subscribe",
  "id": "atr",
  "exchange": "binance",
  "symbol": "BTCUSDT",
  "interval": "1m",
  "indicator": "atr"
}

Why ATR values can differ between platforms

  • Smoothing: TAAPI.IO's atr uses TA-Lib's Wilder smoothing. Some charts offer SMA, EMA or WMA smoothing instead.
  • History: Wilder's average has a long memory, so the amount of earlier data matters.
  • Exchange data: High and low prices differ between venues, particularly in wicks.

ATR API FAQ

What does the ATR API return?

It returns value, plus a timestamp for the request. Results are JSON.

Is the latest ATR value final?

No. The newest value belongs to the candle still forming and can change until it closes. Add backtrack=1 to read the last closed candle.

Which ATR settings can I change?

You can set period. See the parameters table above for defaults.

Can I get ATR for US stocks?

Yes. Use exchange=stocks with a ticker such as AAPL. US stocks are included on the Pro plan and above.

How do I use ATR for a stop loss?

A common approach is entry price minus a multiple of value for longs, for example 2×ATR. The multiple is a choice to test, not a rule.

Does a high ATR mean price will go up?

No. ATR measures the size of moves and has no direction. It rises in sell-offs as well as in rallies.

See the full list of indicators, or start for free.