Inverse Cup and Handle
Category: Chart patterns · Updated November 2026
The TAAPI.IO Inverse Cup and Handle API finds the bearish Inverse Cup and Handle: a rounded top where price rises from a floor, peaks and falls back to the same floor, bounces a little (the handle), and then closes below that floor. It works on crypto pairs and US stocks. Send an exchange, symbol and timeframe, with no candles to download and no pattern logic to maintain.
What one request returns
- The shape: the left and right rims (
l1_*,l2_*), the cup top (hmax_*), the handle top (handle_high_*) and every swing in between (cup_pivot_*), so you can draw the pattern. - The neckline:
neckline_level, the floor that has to break. - The breakout and target: the candle that closed below the neckline, its close, and
projection_price, the neckline minus the height of the cup. - The status:
forming,confirmedorinvalidated, with astatus_reasonthat says why.
The default returns the most recent pattern. Add results=max to get every pattern found in the candles, oldest first.
Example: ETHUSDT on 12 November 2026
Request: ETHUSDT on 4-hour Binance candles with the default settings. Taken at 09:10 UTC.
| Point | Price | Time (UTC) | What it is |
|---|---|---|---|
| Left rim | 2,318.00 | 15 Oct 00:00 | Swing low where the dome starts |
| Cup top | 2,526.62 | 21 Oct 16:00 | Highest high between the rims |
| Right rim | 2,282.46 | 24 Oct 12:00 | Swing low where the dome ends, within about one ATR of the left rim |
| Handle top | 2,371.52 | 28 Oct 20:00 | Bounce after the right rim, well below the cup top |
| Neckline | 2,282.46 | — | The lower of the two rims |
| Breakout | 2,253.13 | 29 Oct 20:00 | First 4-hour close below the neckline |
| Target | 2,038.30 | — | Neckline − (cup top − neckline) = 2,282.46 − 244.16 |
How to interpret this: ETH climbed from 2,318 in mid-October to 2,526 on 21 October and gave it all back by 24 October, ending a little lower at 2,282. Buyers then tried once more, but the bounce stalled at 2,371, less than halfway back up the dome. On 29 October a 4-hour candle closed at 2,253, below the 2,282 floor, and the API marked the pattern confirmed. The measured move takes the height of the dome, 244, and subtracts it from the neckline, which gives 2,038. ETH reached it on 10 November, with a low of 2,006, and is trading near it now.
cup_pivot_prices followed by the handle. The solid line is the neckline up to the breakout, and the lower dashed line is the target, one cup height below it.Candles are combined into 12-hour bars to keep the chart readable; the pattern itself comes from 4-hour candles. Price reaching the target here does not mean it always will. Example for illustration only, not financial advice.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/cupandhandleinverse |
| Outputs | l1_price, hmax_price, l2_price, handle_high_price, neckline_level, breakout_price, projection_price, status, status_reason and more |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get Inverse Cup and Handle with one API call
This request returns Inverse Cup and Handle for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/cupandhandleinverse \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h"
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/cupandhandleinverse',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h'},
)
print(resp.json())const params = new URLSearchParams({"exchange": "binance", "symbol": "BTCUSDT", "timeframe": "1h"});
const res = await fetch(`https://v2.taapi.io/indicator/cupandhandleinverse?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());Inverse Cup and Handle API response
Example for ETHUSDT on 4-hour Binance candles: the pattern charted above, from the live API on 12 November 2026.
{
"l1_timestamp": [1792022400],
"l1_price": [2318],
"hmax_timestamp": [1792598400],
"hmax_price": [2526.62],
"l2_timestamp": [1792843200],
"l2_price": [2282.46],
"handle_high_timestamp": [1793217600],
"handle_high_price": [2371.52],
"cup_pivot_timestamps": [[1792022400, 1792137600, 1792339200, 1792396800, 1792454400, 1792598400, 1792684800, 1792756800, 1792843200]],
"cup_pivot_prices": [[2318, 2477.77, 2329, 2430.87, 2372.62, 2512.54, 2360.32, 2407.85, 2282.46]],
"neckline_level": [2282.46],
"neckline_right_timestamp": [1793304000],
"breakout_occurred": [true],
"is_confirmed": [true],
"breakout_timestamp": [1793304000],
"breakout_price": [2253.13],
"breakout_neckline_price": [2282.46],
"projection_price": [2038.3000000000002],
"direction": ["bearish"],
"status": ["confirmed"],
"status_reason": ["breakout_below_neckline"],
"pattern_index": [13],
"timestamp": [1794470400]
}| Field | Type | Description |
|---|---|---|
l1_timestamp | integer[] | Unix time of the left rim, in seconds |
l1_price | number[] | Left rim: the swing low where the dome starts |
hmax_timestamp | integer[] | Unix time of the cup top |
hmax_price | number[] | Cup top: the highest high between the rims |
l2_timestamp | integer[] | Unix time of the right rim |
l2_price | number[] | Right rim: the swing low where the dome ends |
handle_high_timestamp | (integer or null)[] | Unix time of the handle top, or null if there is no handle yet or it bounced more than half the cup height |
handle_high_price | (number or null)[] | Highest candle body of the bounce after the right rim, before the breakout |
cup_pivot_timestamps | integer[][] | Times of every swing from the left rim to the right rim, for drawing the dome |
cup_pivot_prices | number[][] | Prices of those swings: wick lows and body highs |
neckline_level | number[] | The lower of the two rim lows. A close below it confirms the pattern |
neckline_right_timestamp | integer[] | Where to end the neckline when drawing: the breakout candle, or the end of the breakout window |
breakout_occurred | boolean[] | A candle closed below the neckline |
is_confirmed | boolean[] | Same as breakout_occurred |
breakout_timestamp | (integer or null)[] | Unix time of the first close below the neckline |
breakout_price | (number or null)[] | Close of that candle |
breakout_neckline_price | (number or null)[] | Neckline level at the breakout (the neckline is flat) |
projection_price | (number or null)[] | Target: neckline − (cup top − neckline). Set only when confirmed |
direction | string[] | Always bearish |
status | string[] | forming, confirmed or invalidated |
status_reason | string[] | Why the pattern has that status; see the table below |
pattern_index | integer[] | Position of the pattern in the full list, oldest first |
timestamp | integer[] | Unix time of the latest candle |
Status and status_reason
| status | status_reason | Meaning |
|---|---|---|
forming | awaiting_breakout | The dome is complete and price has not closed below the neckline yet |
confirmed | breakout_below_neckline | A candle closed below the neckline. Confirmation is permanent |
invalidated | handle_broke_cup | Before any breakout, the handle rose to the cup top |
invalidated | bullish_structure_resumed | Before any breakout, the handle made a higher high than an earlier handle high: buyers took over again |
invalidated | breakout_timeout | No close below the neckline within 60 candles of the right rim |
The default results=1 returns only the last pattern in the list, which can be invalidated. Add results=max to get every pattern and filter on status. The response is empty when no pattern is found in the candles, so handle that case in your code. To get only valid patterns merged with other bearish patterns, use Advanced Bearish Patterns, which leaves invalidated ones out.
Inverse Cup and Handle API parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
exchange | string | Yes | — | binance, binancefutures, bybit, gateio, kraken or stocks |
symbol | string | Yes | — | Pair or ticker, e.g. BTCUSDT or AAPL |
timeframe | string | Yes | — | 1m 5m 15m 1h 4h 1d 1w |
depth | integer | No | 10 | Width of the window that confirms a swing: half the candles before it, half after. With 10, a swing low must be the lowest of 5 candles on each side, and appears 5 candles late. Raise it for larger, slower patterns |
deviationATR | number | No | 1 | Minimum retracement required to form a valid structural swing, expressed as a multiple of ATR. |
deviationType | string | No | atr | Type of deviation filter to use: 'atr' (Average True Range) or 'percent'. |
source | string | No | wick | Whether to use 'wick' (high/low) or 'body' (open/close) prices for pivot detection. |
heikinashi | boolean | No | False | Set to true to detect the pattern on smoothed Heikin-Ashi candles instead of real candles. Fewer small swings, but breakouts confirm later and may not match a normal chart. |
atrPeriod | integer | No | 14 | The lookback period used for the Average True Range (ATR) calculation if deviationType is 'atr'. |
results | integer | No | 1 | Number of values to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is the Inverse Cup and Handle?
The Inverse Cup and Handle is the bearish mirror of the Cup and Handle. Price rises from a floor in a rounded arc, tops out, and returns to about the same floor. A short, shallow bounce follows: the handle. When price then closes below the floor, the pattern is complete, and traders often project a move down equal to the height of the dome.
How the API finds it
| Part | Rule |
|---|---|
| Swings | Swing highs and lows confirmed by depth, kept only if they move at least deviationATR × ATR from the previous swing |
| Rims | Two swing lows within about 2 ATR of each other |
| Cup top | The highest swing high between the rims, at least 2 ATR above the neckline |
| Shape | At least 2 swings and 10 candles on each side of the cup top, and no swing low between the rims below the neckline, so a V or an M does not count |
| Neckline | The lower of the two rim lows |
| Handle | The highest swing high after the right rim and before the breakout, with its candle body below the cup top |
| Breakout | The first close below the neckline within 60 candles of the right rim |
| Target | Neckline − (cup top − neckline) |
When several left rims give the same cup top, the API keeps one pattern for it: a valid one before an invalidated one, then the widest.
How to read Inverse Cup and Handle in your code
| Signal | Meaning | Condition |
|---|---|---|
| Breakdown | Price closed below the neckline | status is confirmed |
| Setup to watch | Dome complete, waiting for the break | status is forming; watch for a close below neckline_level |
| Target | Measured move | projection_price |
| Fresh signal | Breakout on the latest candles | breakout_timestamp is close to timestamp |
| Failed setup | Pattern no longer valid | status is invalidated; see status_reason |
Limitations: Swings need depth/2 candles to confirm, so the right rim and handle appear with a delay. Patterns run on real candles; add heikinashi=true for smoothed candles, which find fewer small swings but confirm breakouts later. A confirmed pattern is not a guaranteed move. Nothing on this page is financial advice.
Read Inverse Cup and Handle from Python
Use backtrack=1 to read the result as of the last closed candle.
curl -G https://v2.taapi.io/indicator/cupandhandleinverse \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "backtrack=1"
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/cupandhandleinverse',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h', 'backtrack': 1},
)
data = resp.json()
print(data['l1_timestamp'])Get historical Inverse Cup and Handle values
Add results=max to return every pattern in the candles for backtesting or charting. Patterns are listed oldest first, so the last element is the most recent.
curl -G https://v2.taapi.io/indicator/cupandhandleinverse \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get Inverse Cup and Handle for multiple symbols
Combine Inverse Cup and Handle 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.
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": "cupandhandleinverse",
"indicator": "cupandhandleinverse"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream Inverse Cup and Handle 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.
{
"type": "subscribe",
"id": "cupandhandleinverse",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "cupandhandleinverse"
}Inverse Cup and Handle API FAQ
What does the Inverse Cup and Handle API return?
For each pattern: the rims, the cup top, the handle top and the swings between them, the neckline, the breakout candle and close, the target, and the status with its reason. The default returns the most recent pattern; results=max returns all of them. Results are JSON.
When is a pattern confirmed?
When a candle closes below neckline_level after the right rim. A wick below is not enough. Once confirmed, the status does not change. Add backtrack=1 to ignore the candle that is still forming.
Which Inverse Cup and Handle settings can I change?
You can set depth, deviationATR, deviationType, source, heikinashi and atrPeriod. See the parameters table above for defaults.
Can I get Inverse Cup and Handle for US stocks?
Yes. Use exchange=stocks with a ticker such as AAPL. US stocks are included on the Pro plan and above.
Related indicators
See the full list of indicators, or start for free.