Inverse Cup and Handle
Category: Chart patterns · Updated November 2026
The TAAPI.IO Inverse Cup and Handle API returns l1 timestamp, l1 price, hmax timestamp, hmax price values for the Inverse Cup and Handle 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.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/cupandhandleinverse |
| Outputs | l1_timestamp, l1_price, hmax_timestamp, hmax_price, l2_timestamp, l2_price 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
This response came from the live API on 9 November 2026. Long lists are shortened here.
{
"l1_timestamp": [],
"l1_price": [],
"hmax_timestamp": [],
"hmax_price": [],
"l2_timestamp": [],
"l2_price": [],
"handle_high_timestamp": [],
"handle_high_price": [],
"cup_pivot_timestamps": [],
"cup_pivot_prices": [],
"neckline_level": [],
"neckline_right_timestamp": [],
"breakout_occurred": [],
"is_confirmed": [],
"breakout_timestamp": [],
"breakout_price": [],
"breakout_neckline_price": [],
"projection_price": [],
"direction": [],
"status": [],
"status_reason": [],
"pattern_index": [],
"timestamp": [1794218400]
}This response can be null or empty when there is nothing to report for the requested candles, so handle that case in your code.
| Field | Type | Description |
|---|---|---|
l1_timestamp | array | Unix timestamp of the left rim of the inverted cup (L1). |
l1_price | array | Price level at the left rim of the inverted cup (L1). |
hmax_timestamp | array | Unix timestamp of the highest point at the top of the inverted cup (Hmax). |
hmax_price | array | Price level at the highest point of the inverted cup (Hmax). |
l2_timestamp | array | Unix timestamp of the right rim of the inverted cup (L2). |
l2_price | array | Price level at the right rim of the inverted cup (L2). |
handle_high_timestamp | array | Unix timestamp of the highest point within the inverted handle. |
handle_high_price | array | Price level at the highest point within the inverted handle. |
cup_pivot_timestamps | array | Array of timestamps plotting the interior zigzag path of the inverted cup's dome-shape. |
cup_pivot_prices | array | Array of prices plotting the interior zigzag path of the inverted cup's dome-shape. |
neckline_level | array | The price level of the horizontal support neckline (lowest wick between L1 and L2). |
neckline_right_timestamp | array | Timestamp denoting where the neckline extends to on the right. |
breakout_occurred | array | Boolean flag (true/false) indicating if price successfully broke below the neckline. |
is_confirmed | array | Explicit boolean flag (true/false) indicating if the Inverse Cup and Handle pattern is fully confirmed (synonymous with breakout_occurred). |
breakout_timestamp | array | Unix timestamp of the candle that triggered the confirmation breakdown. |
breakout_price | array | The closing price of the candle that triggered the confirmation breakdown. |
breakout_neckline_price | array | The specific price of the neckline at the exact moment of the breakout. |
projection_price | array | The theoretical downside price target calculated by subtracting the cup's height from the neckline. |
direction | array | The inherent bias of the pattern. Always 'bearish' for an Inverse Cup and Handle. |
status | array | The current state of the pattern: 'forming', 'confirmed', or 'invalidated'. |
status_reason | array | Context detailing why the pattern holds its current status (e.g. 'awaiting_breakout'). |
pattern_index | array | A sequential integer index uniquely identifying this specific pattern instance. |
timestamp | integer[] | Unix time of each candle, in seconds |
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 | Lookback and lookforward period for pivot detection. Controls the width of structural swings. |
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 | True | Set to true to calculate pivots based on smoothed Heikin-Ashi candles rather than raw market prices. |
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 Inverse Cup and Handle?
The Inverse Cup and Handle mirrors the classic pattern: a rounded top followed by a small rise and then a break to the downside. The endpoint returns the structure's lows and high, the handle, the neckline and a projected target.
Inverse Cup and Handle formula
| Output | Calculation |
|---|---|
| Target | Neckline − height of the cup |
How to read Inverse Cup and Handle in your code
| Signal | Meaning | Condition |
|---|---|---|
| Forming or confirmed | Detection status | status and is_confirmed |
| Breakout | Price closed below the neckline | breakout_occurred is true |
| Target | Measured-move projection | projection_price |
Limitations: Geometric pattern detection depends on pivot settings, so tune deviationATR and depth or lookback values on your own market. 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 to return a series for backtesting or charting. The last element is the most recent 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 "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?
It returns l1_timestamp, l1_price, hmax_timestamp, hmax_price, l2_timestamp, l2_price, handle_high_timestamp, handle_high_price, cup_pivot_timestamps, cup_pivot_prices, neckline_level, neckline_right_timestamp, breakout_occurred, is_confirmed, breakout_timestamp, breakout_price, breakout_neckline_price, projection_price, direction, status, status_reason, pattern_index, plus a timestamp for the request. Results are JSON.
Is the latest Inverse Cup and Handle 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 Inverse Cup and Handle settings can I change?
You can set depth, deviationATR, deviationType, source, heikinashi, 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.