Docs / Endpoints
Gaps
POST/v1/gapsunits: 2daily
Opening gaps up and down: how often they fill the same day and within N days, how long filling takes, open-to-close and next-five-day returns by gap size, and the recent gaps that are still open.
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.
Parameters
| Field | Type | Default | Description |
|---|---|---|---|
symbolrequired | string | — | Ticker. |
min_gap | number | 0.01 | Smallest |open ÷ previous close − 1| that counts (0.01 = 1%). |
fill_bars | integer | 5 | Report the share of gaps filled within this many days (1–60). |
start_date | date | — | YYYY-MM-DD. First date to include. Default: the full history available. |
end_date | date | — | YYYY-MM-DD. Last date to include. Default: the latest bar. |
limit | integer | 20 | Recent and unfilled gaps to list, ≤ 200. |
Example request
Do TSLA's big gaps fill? Read the walkthrough →
Request
POST /v1/gaps{ "symbol": "TSLA", "min_gap": 0.03, "start_date": "2020-01-01" }
The same call with curl, Python and JavaScript
curl https://clickapis.com/v1/gaps \
-H "Authorization: Bearer $CLICKAPIS_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol":"TSLA","min_gap":0.03,"start_date":"2020-01-01"}'import os, requests
r = requests.post(
"https://clickapis.com/v1/gaps",
headers={"Authorization": f"Bearer {os.environ['CLICKAPIS_KEY']}"},
json={
"symbol": "TSLA",
"min_gap": 0.03,
"start_date": "2020-01-01"
},
timeout=60,
)
print(r.json()["data"])const r = await fetch("https://clickapis.com/v1/gaps", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.CLICKAPIS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"symbol": "TSLA",
"min_gap": 0.03,
"start_date": "2020-01-01"
}),
});
console.log((await r.json()).data);Example response
Response 200 OK
{ "ok": true, "data": { "symbol": "TSLA", "start": "2020-01-02", "end": "2026-11-12", "min_gap": 0.03, "fill_bars": 5, "bars": 1726, "gap_up": { "count": 115, "avg_gap": 0.056107, "fill_same_bar_rate": 0.26087, "fill_within_n_rate": 0.556522, "filled_eventually_rate": 0.843478, "avg_bars_to_fill": 10.96, "median_bars_to_fill": 2.0, "open_to_close": { "count": 115, "mean": -0.000984, "median": -0.00436, "win_rate": 0.46087 }, "next_5": { "count": 115, "mean": 0.023488, "median": 0.010128, "win_rate": 0.53913 }, "share_of_bars": 0.066628 }, "gap_down": { "count": 105, "avg_gap": -0.05286, "fill_same_bar_rate": 0.2, "fill_within_n_rate": 0.609524, "filled_eventually_rate": 0.980952, "avg_bars_to_fill": 12.83, "median_bars_to_fill": 2.0, "open_to_close": { "count": 105, "mean": 0.001911, "median": 0.00147, "win_rate": 0.52381 }, "next_5": { "count": 105, "mean": 0.026892, "median": 0.017416, "win_rate": 0.590476 }, "share_of_bars": 0.060834 }, "baseline": { "open_to_close": { "count": 1726, "mean": 0.000635, "median": 6.7e-5, "win_rate": 0.500579 }, "next_5": { "count": 1721, "mean": 0.01163, "median": 0.003357, "win_rate": 0.518303 } }, "by_size": [ { "count": 61, "avg_gap": 0.03776, "fill_same_bar_rate": 0.344262, "fill_within_n_rate": 0.639344, "filled_eventually_rate": 0.95082, "avg_bars_to_fill": 10.19, "median_bars_to_fill": 1.0, "open_to_close": { "count": 61, "mean": 0.00273, "median": -0.005096, "win_rate": 0.42623 }, "next_5": { "count": 61, "mean": 0.018342, "median": 0.010613, "win_rate": 0.557377 }, "direction": "up", "bucket": "3%-5%" }, { "count": 68, "avg_gap": -0.039851, "fill_same_bar_rate": 0.235294, "fill_within_n_rate": 0.676471, "filled_eventually_rate": 0.985294, "avg_bars_to_fill": 12.46, "median_bars_to_fill": 2.0, "open_to_close": { "count": 68, "mean": 0.001442, "median": 0.002784, "win_rate": 0.529412 }, "next_5": { "count": 68, "mean": 0.034942, "median": 0.028806, "win_rate": 0.632353 }, "direction": "down", "bucket": "3%-5%" }, { "count": 46, "avg_gap": 0.06822, "fill_same_bar_rate": 0.195652, "fill_within_n_rate": 0.521739, "filled_eventually_rate": 0.782609, "avg_bars_to_fill": 10.58, "median_bars_to_fill": 3.0, "open_to_close": { "count": 46, "mean": -0.006339, "median": -0.005441, "win_rate": 0.478261 }, "next_5": { "count": 46, "mean": 0.016404, "median": 0.001258, "win_rate": 0.5 }, "direction": "up", "bucket": "5%-10%" }, { "count": 33, "avg_gap": -0.069784, "fill_same_bar_rate": 0.151515, "fill_within_n_rate": 0.515152, "filled_eventually_rate": 0.969697, "avg_bars_to_fill": 13.88, "median_bars_to_fill": 4.0, "open_to_close": { "count": 33, "mean": 0.004519, "median": 0.000742, "win_rate": 0.515152 }, "next_5": { "count": 33, "mean": 0.011659, "median": 0.009728, "win_rate": 0.545455 }, "direction": "down", "bucket": "5%-10%" }, { "count": 8, "avg_gap": 0.126349, "fill_same_bar_rate": 0.0, "fill_within_n_rate": 0.125, "filled_eventually_rate": 0.375, "avg_bars_to_fill": 30.33, "median_bars_to_fill": 9.0, "open_to_close": { "count": 8, "mean": 0.001492, "median": 0.003316, "win_rate": 0.625 }, "next_5": { "count": 8, "mean": 0.10346, "median": 0.127359, "win_rate": 0.625 }, "direction": "up", "bucket": "10%+" }, { "count": 4, "avg_gap": -0.134389, "fill_same_bar_rate": 0.0, "fill_within_n_rate": 0.25, "filled_eventually_rate": 1.0, "avg_bars_to_fill": 10.5, "median_bars_to_fill": 6.5, "open_to_close": { "count": 4, "mean": -0.011646, "median": -0.023932, "win_rate": 0.5 }, "next_5": { "count": 4, "mean": 0.015709, "median": -0.015628, "win_rate": 0.25 }, "direction": "down", "bucket": "10%+" } ], "recent": [ { "date": "2026-11-04", "direction": "down", "gap": -0.046926, "prev_close": 398.5, "open": 379.8, "close": 385.19, "filled_same_bar": false, "filled_within_n": false, "bars_to_fill": 6, "fill_date": "2026-11-12", "open_to_close": 0.014192, "next_5": 0.014668 }, { "date": "2026-10-26", "direction": "up", "gap": 0.031574, "prev_close": 372.22, "open": 383.9725, "close": 391.62, "filled_same_bar": false, "filled_within_n": false, "bars_to_fill": 8, "fill_date": "2026-11-05", "open_to_close": 0.019917, "next_5": 0.031153 }, { "date": "2026-10-22", "direction": "down", "gap": -0.032189, "prev_close": 386.47, "open": 374.03, "close": 374.58, "filled_same_bar": true, "filled_within_n": true, "bars_to_fill": 0, "fill_date": "2026-10-22", "open_to_close": 0.00147, "next_5": 0.076673 }, { "date": "2026-09-04", "direction": "down", "gap": -0.037689, "prev_close": 376.365, "open": 362.18, "close": 354.08, "filled_same_bar": false, "filled_within_n": false, "bars_to_fill": 10, "fill_date": "2026-09-21", "open_to_close": -0.022365, "next_5": 0.01381 }, { "date": "2026-07-23", "direction": "down", "gap": -0.08826, "prev_close": 374.01, "open": 341.0, "close": 319.69, "filled_same_bar": false, "filled_within_n": false, "bars_to_fill": 30, "fill_date": "2026-09-03", "open_to_close": -0.062493, "next_5": -0.033908 }, "… 12 more items …", { "date": "2025-06-06", "direction": "up", "gap": 0.049631, "prev_close": 284.7, "open": 298.83, "close": 295.14, "filled_same_bar": false, "filled_within_n": true, "bars_to_fill": 1, "fill_date": "2025-06-09", "open_to_close": -0.012348, "next_5": 0.102223 }, { "date": "2025-05-19", "direction": "down", "gap": -0.039088, "prev_close": 349.98, "open": 336.3, "close": 342.09, "filled_same_bar": false, "filled_within_n": true, "bars_to_fill": 1, "fill_date": "2025-05-20", "open_to_close": 0.017217, "next_5": 0.060803 }, { "date": "2025-05-12", "direction": "up", "gap": 0.079561, "prev_close": 298.26, "open": 321.99, "close": 318.38, "filled_same_bar": false, "filled_within_n": false, "bars_to_fill": 17, "fill_date": "2025-06-05", "open_to_close": -0.011212, "next_5": 0.074471 } ], "unfilled": [], "notes": [ "Gap = open / previous close - 1, kept when |gap| >= 0.03.", "Filled = price traded back to the previous close (low for a gap up, high for a gap down), searched up to 252 bars ahead; bars_to_fill 0 = the gap bar itself.", "next_5 runs from the gap bar's close to the close 5 bars later. unfilled: gaps from the last 252 bars that price has not traded back to yet." ] }, "meta": { "op": "gaps", "units": 2, "cost_usd": 0.0, "billing": "internal", "free_call": false, "free_calls_left": 0, "balance_usd": 5.0, "ms": 4, "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.