ClickAPIs
Docs · Streaks

Docs / Endpoints

Streaks

POST/v1/streaksunits: 2intraday

Runs of consecutive up and down closes: how long they last, the current streak and how often one that long carried on, and what happened over the next bar and next five bars after an N-day up or down streak.

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.
max_ninteger7Report what followed streaks of 1 to max_n bars (1–15).
start_datedate—YYYY-MM-DD. First date to include. Default: the full history available.
end_datedate—YYYY-MM-DD. Last date to include. Default: the latest bar.
intervalstring"1day""1day" | "1hour" | "30min" | "15min" | "5min" | "1min". Intraday costs 5× the units; see Intraday.

Example request

After 5 down days in a row, what does QQQ do? Read the walkthrough →

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

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

Example response

Response 200 OK
{
  "ok": true,
  "data": {
    "symbol": "QQQ",
    "start": "1999-03-10",
    "end": "2026-11-12",
    "runs": {
      "up": 1743,
      "down": 1738,
      "avg_up_length": 2.174,
      "avg_down_length": 1.801,
      "longest_up": 14,
      "longest_down": 10
    },
    "distribution": [
      {
        "length": 1,
        "up_runs": 822,
        "down_runs": 948,
        "up_share": 0.471601,
        "down_share": 0.545455
      },
      {
        "length": 2,
        "up_runs": 417,
        "down_runs": 436,
        "up_share": 0.239243,
        "down_share": 0.250863
      },
      {
        "length": 3,
        "up_runs": 231,
        "down_runs": 209,
        "up_share": 0.13253,
        "down_share": 0.120253
      },
      {
        "length": 4,
        "up_runs": 119,
        "down_runs": 82,
        "up_share": 0.068273,
        "down_share": 0.047181
      },
      {
        "length": 5,
        "up_runs": 69,
        "down_runs": 40,
        "up_share": 0.039587,
        "down_share": 0.023015
      },
      "… 6 more items …",
      {
        "length": 12,
        "up_runs": 1,
        "down_runs": 0,
        "up_share": 0.000574,
        "down_share": 0.0
      },
      {
        "length": 13,
        "up_runs": 1,
        "down_runs": 0,
        "up_share": 0.000574,
        "down_share": 0.0
      },
      {
        "length": 14,
        "up_runs": 1,
        "down_runs": 0,
        "up_share": 0.000574,
        "down_share": 0.0
      }
    ],
    "current": {
      "direction": "down",
      "length": 1,
      "start": "2026-11-12",
      "return": -0.004345,
      "runs_at_least_this_long": 1738,
      "historical_continue_prob": 0.454545
    },
    "baseline": {
      "next_1": {
        "count": 6963,
        "mean": 0.000541,
        "median": 0.001148,
        "win_rate": 0.544162
      },
      "next_5": {
        "count": 6959,
        "mean": 0.002586,
        "median": 0.004973,
        "win_rate": 0.574364
      }
    },
    "after_streak": [
      {
        "n": 1,
        "up": {
          "count": 1743,
          "next_1": {
            "count": 1743,
            "mean": 0.00012,
            "median": 0.000879,
            "win_rate": 0.528399
          },
          "next_5": {
            "count": 1741,
            "mean": 0.002199,
            "median": 0.004739,
            "win_rate": 0.563469
          },
          "edge_1": -0.000421,
          "edge_5": -0.000387,
          "continue_prob": 0.528399
        },
        "down": {
          "count": 1738,
          "next_1": {
            "count": 1737,
            "mean": 0.000166,
            "median": 0.001076,
            "win_rate": 0.53886
          },
          "next_5": {
            "count": 1736,
            "mean": 0.002111,
            "median": 0.005228,
            "win_rate": 0.580645
          },
          "edge_1": -0.000375,
          "edge_5": -0.000475,
          "continue_prob": 0.454807
        }
      },
      {
        "n": 2,
        "up": {
          "count": 921,
          "next_1": {
            "count": 921,
            "mean": -5.6e-5,
            "median": 0.000925,
            "win_rate": 0.547231
          },
          "next_5": {
            "count": 920,
            "mean": -0.00033,
            "median": 0.003337,
            "win_rate": 0.551087
          },
          "edge_1": -0.000597,
          "edge_5": -0.002916,
          "continue_prob": 0.547231
        },
        "down": {
          "count": 790,
          "next_1": {
            "count": 790,
            "mean": 0.000138,
            "median": 0.001319,
            "win_rate": 0.548101
          },
          "next_5": {
            "count": 790,
            "mean": 0.004097,
            "median": 0.004639,
            "win_rate": 0.564557
          },
          "edge_1": -0.000403,
          "edge_5": 0.001511,
          "continue_prob": 0.448101
        }
      },
      {
        "n": 3,
        "up": {
          "count": 504,
          "next_1": {
            "count": 504,
            "mean": 0.000535,
            "median": 0.00096,
            "win_rate": 0.541667
          },
          "next_5": {
            "count": 504,
            "mean": 0.001444,
            "median": 0.004631,
            "win_rate": 0.581349
          },
          "edge_1": -6.0e-6,
          "edge_5": -0.001142,
          "continue_prob": 0.541667
        },
        "down": {
          "count": 354,
          "next_1": {
            "count": 354,
            "mean": 0.004466,
            "median": 0.003429,
            "win_rate": 0.584746
          },
          "next_5": {
            "count": 354,
            "mean": 0.007449,
            "median": 0.006889,
            "win_rate": 0.59322
          },
          "edge_1": 0.003925,
          "edge_5": 0.004863,
          "continue_prob": 0.409605
        }
      },
      {
        "n": 4,
        "up": {
          "count": 273,
          "next_1": {
            "count": 273,
            "mean": 2.4e-5,
            "median": 0.001021,
            "win_rate": 0.564103
          },
          "next_5": {
            "count": 273,
            "mean": 0.001012,
            "median": 0.003727,
            "win_rate": 0.556777
          },
          "edge_1": -0.000517,
          "edge_5": -0.001574,
          "continue_prob": 0.564103
        },
        "down": {
          "count": 145,
          "next_1": {
            "count": 145,
            "mean": -0.000463,
            "median": 0.001827,
            "win_rate": 0.565517
          },
          "next_5": {
            "count": 145,
            "mean": 0.006536,
            "median": 0.007006,
            "win_rate": 0.593103
          },
          "edge_1": -0.001004,
          "edge_5": 0.00395,
          "continue_prob": 0.434483
        }
      },
      {
        "n": 5,
        "up": {
          "count": 154,
          "next_1": {
            "count": 154,
            "mean": 0.000717,
            "median": 0.000649,
            "win_rate": 0.551948
          },
          "next_5": {
            "count": 154,
            "mean": 0.002029,
            "median": 0.003793,
            "win_rate": 0.597403
          },
          "edge_1": 0.000176,
          "edge_5": -0.000557,
          "continue_prob": 0.551948
        },
        "down": {
          "count": 63,
          "next_1": {
            "count": 63,
            "mean": 0.012891,
            "median": 0.00695,
            "win_rate": 0.634921
          },
          "next_5": {
            "count": 63,
            "mean": 0.018779,
            "median": 0.012903,
            "win_rate": 0.698413
          },
          "edge_1": 0.01235,
          "edge_5": 0.016193,
          "continue_prob": 0.365079
        }
      },
      {
        "n": 6,
        "up": {
          "count": 85,
          "next_1": {
            "count": 85,
            "mean": -4.5e-5,
            "median": 0.001296,
            "win_rate": 0.576471
          },
          "next_5": {
            "count": 85,
            "mean": 0.002376,
            "median": 0.004081,
            "win_rate": 0.647059
          },
          "edge_1": -0.000586,
          "edge_5": -0.00021,
          "continue_prob": 0.576471
        },
        "down": {
          "count": 23,
          "next_1": {
            "count": 23,
            "mean": 0.008107,
            "median": 0.007432,
            "win_rate": 0.652174
          },
          "next_5": {
            "count": 23,
            "mean": 0.003788,
            "median": 0.005819,
            "win_rate": 0.521739
          },
          "edge_1": 0.007566,
          "edge_5": 0.001202,
          "continue_prob": 0.347826
        }
      },
      {
        "n": 7,
        "up": {
          "count": 49,
          "next_1": {
            "count": 49,
            "mean": -0.000991,
            "median": 0.000264,
            "win_rate": 0.510204
          },
          "next_5": {
            "count": 49,
            "mean": 0.005848,
            "median": 0.007042,
            "win_rate": 0.673469
          },
          "edge_1": -0.001532,
          "edge_5": 0.003262,
          "continue_prob": 0.510204
        },
        "down": {
          "count": 8,
          "next_1": {
            "count": 8,
            "mean": -0.00648,
            "median": -0.006545,
            "win_rate": 0.25
          },
          "next_5": {
            "count": 8,
            "mean": 0.003325,
            "median": 0.006207,
            "win_rate": 0.5
          },
          "edge_1": -0.007021,
          "edge_5": 0.000739,
          "continue_prob": 0.75
        }
      }
    ],
    "notes": [
      "Runs are consecutive higher (up) or lower (down) closes; an unchanged close ends a run.",
      "after_streak[n].up: bars that completed exactly n consecutive higher closes. continue_prob: share where the next bar moved the same way. edge = mean - baseline mean.",
      "historical_continue_prob: of past runs at least as long as the current one, the share that lasted at least one more bar."
    ],
    "interval": "1day"
  },
  "meta": {
    "op": "streaks",
    "units": 2,
    "cost_usd": 0.0,
    "billing": "internal",
    "free_call": false,
    "free_calls_left": 0,
    "balance_usd": 5.0,
    "ms": 12,
    "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.