ClickAPIs
Docs · Range & ATR

Docs / Endpoints

Range & ATR

POST/v1/rangeunits: 2intraday

True range and ATR with its regime percentile, inside/outside days, NR4/NR7 bars and what followed them, average range by weekday and expansion/contraction streaks.

Add "async": true to run it as a job, and "webhook_url" to be called when it finishes (Jobs & async). Calls estimated above 1,000 units run as jobs automatically. Supports interval for intraday bars at 5× the units (Intraday).

Parameters

FieldTypeDefaultDescription
symbolrequiredstring—Ticker symbol, e.g. AAPL, SPY, BTC-USD.
atr_periodinteger14ATR period in bars (Wilder smoothing).
percentile_barsinteger1260Bars of ATR% history the current ATR% is ranked against (1260 = ~5 years daily).
start_datedate—First date to include (YYYY-MM-DD). Default: all available history.
end_datedate—Last date to include (YYYY-MM-DD). Default: the latest bar.
intervalstring"1day""1day" | "1hour" | "30min" | "15min" | "5min" | "1min". Intraday costs 5× the units; see Intraday.

Example request

Is TSLA's daily range unusually wide or narrow? Read the walkthrough →

Request POST /v1/range
{
  "symbol": "TSLA"
}
The same call with curl, Python and JavaScript
curl https://clickapis.com/v1/range \
  -H "Authorization: Bearer $CLICKAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"TSLA"}'
import os, requests

r = requests.post(
    "https://clickapis.com/v1/range",
    headers={"Authorization": f"Bearer {os.environ['CLICKAPIS_KEY']}"},
    json={
      "symbol": "TSLA"
    },
    timeout=60,
)
print(r.json()["data"])
const r = await fetch("https://clickapis.com/v1/range", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.CLICKAPIS_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "symbol": "TSLA"
  }),
});
console.log((await r.json()).data);

Example response

Response 200 OK
{
  "ok": true,
  "data": {
    "symbol": "TSLA",
    "as_of": "2026-11-12",
    "bars": 4120,
    "atr_period": 14,
    "today": {
      "high": 401.165,
      "low": 385.2,
      "range": 0.041446,
      "true_range": 15.965,
      "true_range_vs_atr": 0.963609,
      "inside_day": false,
      "outside_day": true,
      "nr4": false,
      "nr7": false
    },
    "atr": {
      "value": 16.5249,
      "pct_of_price": 0.041369,
      "percentile": 0.3056,
      "regime": "normal",
      "percentile_window_bars": 1260,
      "median_pct": 0.04634,
      "min_pct": 0.029379,
      "max_pct": 0.102737,
      "change_vs_20_bars_ago": 0.48684
    },
    "range_pct_stats_1y": {
      "mean": 0.035955,
      "median": 0.032959,
      "p90": 0.053693
    },
    "inside_days": {
      "count_1y": 33,
      "share_1y": 0.130952,
      "after": {
        "count": 618,
        "last": "2026-11-10",
        "next_bar_range_vs_atr": 0.936456,
        "avg_abs_move_5d": 0.058845,
        "avg_abs_move_5d_all_bars": 0.059944,
        "broke_up_first": 0.482201,
        "broke_down_first": 0.420712
      }
    },
    "outside_days": {
      "count_1y": 20,
      "share_1y": 0.079365,
      "after": {
        "count": 269,
        "last": "2026-10-22",
        "next_bar_range_vs_atr": 0.988172,
        "avg_abs_move_5d": 0.057834,
        "avg_abs_move_5d_all_bars": 0.059944,
        "broke_up_first": 0.524164,
        "broke_down_first": 0.438662
      }
    },
    "nr4": {
      "count_1y": 65,
      "after": {
        "count": 1093,
        "last": "2026-11-11",
        "next_bar_range_vs_atr": 0.884444,
        "avg_abs_move_5d": 0.057724,
        "avg_abs_move_5d_all_bars": 0.059944,
        "broke_up_first": 0.459286,
        "broke_down_first": 0.416285
      }
    },
    "nr7": {
      "count_1y": 35,
      "after": {
        "count": 609,
        "last": "2026-11-11",
        "next_bar_range_vs_atr": 0.865731,
        "avg_abs_move_5d": 0.058853,
        "avg_abs_move_5d_all_bars": 0.059944,
        "broke_up_first": 0.454844,
        "broke_down_first": 0.405583
      }
    },
    "by_weekday": [
      {
        "weekday": "Mon",
        "bars": 771,
        "avg_range": 0.045836,
        "avg_true_range_pct": 0.050127
      },
      {
        "weekday": "Tue",
        "bars": 848,
        "avg_range": 0.043843,
        "avg_true_range_pct": 0.046173
      },
      {
        "weekday": "Wed",
        "bars": 845,
        "avg_range": 0.04244,
        "avg_true_range_pct": 0.044478
      },
      {
        "weekday": "Thu",
        "bars": 830,
        "avg_range": 0.044107,
        "avg_true_range_pct": 0.048145
      },
      {
        "weekday": "Fri",
        "bars": 826,
        "avg_range": 0.040431,
        "avg_true_range_pct": 0.042075
      }
    ],
    "streaks": {
      "expanding_now": 2,
      "expanding_longest": 6,
      "contracting_now": 0,
      "contracting_longest": 6
    },
    "series": [
      {
        "date": "2026-08-20",
        "true_range": 12.16,
        "atr": 13.26986,
        "atr_pct": 0.038449
      },
      {
        "date": "2026-08-21",
        "true_range": 21.37,
        "atr": 13.848441,
        "atr_pct": 0.038165
      },
      {
        "date": "2026-08-24",
        "true_range": 14.98,
        "atr": 13.929267,
        "atr_pct": 0.039918
      },
      {
        "date": "2026-08-25",
        "true_range": 8.05,
        "atr": 13.509319,
        "atr_pct": 0.038571
      },
      {
        "date": "2026-08-26",
        "true_range": 9.4,
        "atr": 13.215797,
        "atr_pct": 0.038216
      },
      {
        "date": "2026-08-27",
        "true_range": 10.29,
        "atr": 13.006811,
        "atr_pct": 0.036659
      },
      {
        "date": "2026-08-28",
        "true_range": 13.6,
        "atr": 13.049182,
        "atr_pct": 0.037417
      },
      {
        "date": "2026-08-31",
        "true_range": 21.77,
        "atr": 13.672097,
        "atr_pct": 0.037157
      },
      {
        "date": "2026-09-01",
        "true_range": 14.99,
        "atr": 13.766233,
        "atr_pct": 0.038659
      },
      {
        "date": "2026-09-02",
        "true_range": 10.69,
        "atr": 13.546502,
        "atr_pct": 0.037944
      },
      {
        "date": "2026-09-03",
        "true_range": 27.03,
        "atr": 14.509609,
        "atr_pct": 0.038552
      },
      {
        "date": "2026-09-04",
        "true_range": 25.0449,
        "atr": 15.26213,
        "atr_pct": 0.043104
      },
      {
        "date": "2026-09-08",
        "true_range": 15.91,
        "atr": 15.308406,
        "atr_pct": 0.041581
      },
      {
        "date": "2026-09-09",
        "true_range": 8.17,
        "atr": 14.79852,
        "atr_pct": 0.040234
      },
      {
        "date": "2026-09-10",
        "true_range": 11.53,
        "atr": 14.565055,
        "atr_pct": 0.040062
      },
      {
        "date": "2026-09-11",
        "true_range": 7.06,
        "atr": 14.028979,
        "atr_pct": 0.038389
      },
      {
        "date": "2026-09-14",
        "true_range": 10.69,
        "atr": 13.790481,
        "atr_pct": 0.038417
      },
      {
        "date": "2026-09-15",
        "true_range": 8.33,
        "atr": 13.400446,
        "atr_pct": 0.03758
      },
      {
        "date": "2026-09-16",
        "true_range": 10.1586,
        "atr": 13.168886,
        "atr_pct": 0.036776
      },
      {
        "date": "2026-09-17",
        "true_range": 16.04,
        "atr": 13.373965,
        "atr_pct": 0.036521
      },
      {
        "date": "2026-09-18",
        "true_range": 10.149,
        "atr": 13.143611,
        "atr_pct": 0.036082
      },
      {
        "date": "2026-09-21",
        "true_range": 14.09,
        "atr": 13.21121,
        "atr_pct": 0.035202
      },
      {
        "date": "2026-09-22",
        "true_range": 7.52,
        "atr": 12.804695,
        "atr_pct": 0.033794
      },
      {
        "date": "2026-09-23",
        "true_range": 9.125,
        "atr": 12.54186,
        "atr_pct": 0.032994
      },
      {
        "date": "2026-09-24",
        "true_range": 7.6324,
        "atr": 12.191184,
        "atr_pct": 0.032257
      },
      {
        "date": "2026-09-25",
        "true_range": 19.16,
        "atr": 12.688957,
        "atr_pct": 0.0341
      },
      {
        "date": "2026-09-28",
        "true_range": 15.31,
        "atr": 12.876174,
        "atr_pct": 0.036022
      },
      {
        "date": "2026-09-29",
        "true_range": 7.06,
        "atr": 12.460733,
        "atr_pct": 0.035316
      },
      {
        "date": "2026-09-30",
        "true_range": 9.3,
        "atr": 12.234966,
        "atr_pct": 0.034483
      },
      {
        "date": "2026-10-01",
        "true_range": 5.99,
        "atr": 11.788897,
        "atr_pct": 0.033292
      },
      {
        "date": "2026-10-02",
        "true_range": 20.49,
        "atr": 12.410405,
        "atr_pct": 0.033488
      },
      {
        "date": "2026-10-05",
        "true_range": 16.68,
        "atr": 12.715376,
        "atr_pct": 0.033574
      },
      {
        "date": "2026-10-06",
        "true_range": 4.81,
        "atr": 12.150706,
        "atr_pct": 0.031918
      },
      {
        "date": "2026-10-07",
        "true_range": 7.9199,
        "atr": 11.848506,
        "atr_pct": 0.031361
      },
      {
        "date": "2026-10-08",
        "true_range": 9.7799,
        "atr": 11.700748,
        "atr_pct": 0.031202
      },
      {
        "date": "2026-10-09",
        "true_range": 13.56,
        "atr": 11.833552,
        "atr_pct": 0.030921
      },
      {
        "date": "2026-10-12",
        "true_range": 5.12,
        "atr": 11.354012,
        "atr_pct": 0.030035
      },
      {
        "date": "2026-10-13",
        "true_range": 6.73,
        "atr": 11.023726,
        "atr_pct": 0.029379
      },
      {
        "date": "2026-10-14",
        "true_range": 11.41,
        "atr": 11.051317,
        "atr_pct": 0.030099
      },
      {
        "date": "2026-10-15",
        "true_range": 11.93,
        "atr": 11.11408,
        "atr_pct": 0.030665
      },
      {
        "date": "2026-10-16",
        "true_range": 19.5849,
        "atr": 11.719138,
        "atr_pct": 0.033038
      },
      {
        "date": "2026-10-19",
        "true_range": 15.10501,
        "atr": 11.960986,
        "atr_pct": 0.032497
      },
      {
        "date": "2026-10-20",
        "true_range": 13.95,
        "atr": 12.103059,
        "atr_pct": 0.032386
      },
      {
        "date": "2026-10-21",
        "true_range": 15.133,
        "atr": 12.319483,
        "atr_pct": 0.031877
      },
      {
        "date": "2026-10-22",
        "true_range": 15.1495,
        "atr": 12.521627,
        "atr_pct": 0.033428
      },
      {
        "date": "2026-10-23",
        "true_range": 12.03,
        "atr": 12.486511,
        "atr_pct": 0.033546
      },
      {
        "date": "2026-10-26",
        "true_range": 25.05,
        "atr": 13.383903,
        "atr_pct": 0.034176
      },
      {
        "date": "2026-10-27",
        "true_range": 16.81,
        "atr": 13.628624,
        "atr_pct": 0.033448
      },
      {
        "date": "2026-10-28",
        "true_range": 13.67,
        "atr": 13.63158,
        "atr_pct": 0.033723
      },
      {
        "date": "2026-10-29",
        "true_range": 6.48,
        "atr": 13.120753,
        "atr_pct": 0.032533
      },
      {
        "date": "2026-10-30",
        "true_range": 16.68,
        "atr": 13.374985,
        "atr_pct": 0.033453
      },
      {
        "date": "2026-11-02",
        "true_range": 16.62,
        "atr": 13.606771,
        "atr_pct": 0.033695
      },
      {
        "date": "2026-11-03",
        "true_range": 9.95,
        "atr": 13.345573,
        "atr_pct": 0.03349
      },
      {
        "date": "2026-11-04",
        "true_range": 22.9999,
        "atr": 14.035168,
        "atr_pct": 0.036437
      },
      {
        "date": "2026-11-05",
        "true_range": 47.04,
        "atr": 16.392656,
        "atr_pct": 0.047696
      },
      {
        "date": "2026-11-06",
        "true_range": 20.1498,
        "atr": 16.661024,
        "atr_pct": 0.046511
      },
      {
        "date": "2026-11-09",
        "true_range": 23.98,
        "atr": 17.183808,
        "atr_pct": 0.045454
      },
      {
        "date": "2026-11-10",
        "true_range": 9.55001,
        "atr": 16.638536,
        "atr_pct": 0.043811
      },
      {
        "date": "2026-11-11",
        "true_range": 15.65,
        "atr": 16.567927,
        "atr_pct": 0.042391
      },
      {
        "date": "2026-11-12",
        "true_range": 15.965,
        "atr": 16.52486,
        "atr_pct": 0.041369
      }
    ],
    "interval": "1day"
  },
  "meta": {
    "op": "range",
    "units": 2,
    "cost_usd": 0.0,
    "billing": "internal",
    "free_call": false,
    "free_calls_left": 0,
    "balance_usd": 5.0,
    "ms": 30,
    "interval": "1day",
    "data_as_of": "2026-11-12",
    "partial_last_bar": false
  }
}

Every response has the same envelope: ok, data and meta (op, units, cost_usd, ms, interval, billing, balance_usd, data_as_of, partial_last_bar). Numbers are decimals (0.05 = 5%), dates ISO, and a value that cannot be computed is null.