GET
/indicator/inverseheadandshoulders
INVERSEHEADANDSHOULDERS
Category: Pattern Recognition - Advanced
Head and Shoulders Inverse Pattern
Common parameters
All indicator requests share these parameters. See Single Indicator for details.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
exchange | string | Yes | — | Exchange identifier, e.g. binance, bybit. |
symbol | string | Yes | — | Trading pair, e.g. BTCUSDT. |
timeframe | string | Yes | — | Candle interval: 1m, 5m, 15m, 1h, 4h, 1d, 1w. |
results | integer | No | 1 | Number of historical values. Use max for all available. |
backtrack | integer | No | 0 | Candles to skip from most recent. |
Indicator parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
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'. |
headProminenceATR | number | No | 1.2 | Minimum required prominence of the head relative to both shoulders, normalized by ATR. |
shoulderToleranceATR | number | No | 1.5 | Maximum allowed price difference between the left and right shoulders, normalized by ATR. |
minDepthATR | number | No | 1 | Minimum depth of the two peaks (H1 and H2), ensuring distinct shoulders. |
symmetryMin | number | No | 0.5 | Minimum ratio of time spent forming the left half vs the right half of the pattern. |
symmetryMax | number | No | 3.5 | Maximum ratio of time spent forming the left half vs the right half of the pattern. |
breakoutLookahead | integer | No | 20 | Number of candles to look ahead after the right shoulder to confirm a breakout. |
necklineBuffer | number | No | 0.2 | ATR-based buffer above the neckline to filter out false breakouts during formation. |
Example
curl -G https://v2.taapi.io/indicator/inverseheadandshoulders \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "depth=10" \ --data-urlencode "deviationATR=1" \ --data-urlencode "deviationType=atr" \ --data-urlencode "source=wick" \ --data-urlencode "heikinashi=True" \ --data-urlencode "atrPeriod=14" \ --data-urlencode "headProminenceATR=1.2" \ --data-urlencode "shoulderToleranceATR=1.5" \ --data-urlencode "minDepthATR=1" \ --data-urlencode "symmetryMin=0.5" \ --data-urlencode "symmetryMax=3.5" \ --data-urlencode "breakoutLookahead=20" \ --data-urlencode "necklineBuffer=0.2"
const res = await fetch(
'https://v2.taapi.io/indicator/inverseheadandshoulders?exchange=binance&symbol=BTCUSDT&timeframe=1h',
{ headers: { Authorization: 'Bearer YOUR_API_KEY' } }
);
const data = await res.json();
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/inverseheadandshoulders',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h'}
)
print(resp.json())
Response
Results are always wrapped in arrays, even when only one value is returned.
200 OK
{
"l1_timestamp": [1708300800],
"l1_price": [0.0],
"h1_timestamp": [1708300800],
"h1_price": [0.0],
"l2_timestamp": [1708300800],
"l2_price": [0.0],
"h2_timestamp": [1708300800],
"h2_price": [0.0],
"l3_timestamp": [1708300800],
"l3_price": [0.0],
"neckline_left_timestamp": [1708300800],
"neckline_left_price": [0.0],
"neckline_right_timestamp": [1708300800],
"neckline_right_price": [0.0],
"neckline_at_l2": [0.0],
"breakout_neckline_price": [0.0],
"breakout_occurred": [0.0],
"is_confirmed": [0.0],
"breakout_timestamp": [1708300800],
"breakout_price": [0.0],
"projection_price": [0.0],
"direction": [0.0],
"status": [0.0],
"status_reason": [0.0],
"pattern_index": [0.0],
"timestamp": [1708300800]
}
Errors
Response
{
"l1_timestamp": [1708300800],
"l1_price": [0.0],
"h1_timestamp": [1708300800],
"h1_price": [0.0],
"l2_timestamp": [1708300800],
"l2_price": [0.0],
"h2_timestamp": [1708300800],
"h2_price": [0.0],
"l3_timestamp": [1708300800],
"l3_price": [0.0],
"neckline_left_timestamp": [1708300800],
"neckline_left_price": [0.0],
"neckline_right_timestamp": [1708300800],
"neckline_right_price": [0.0],
"neckline_at_l2": [0.0],
"breakout_neckline_price": [0.0],
"breakout_occurred": [0.0],
"is_confirmed": [0.0],
"breakout_timestamp": [1708300800],
"breakout_price": [0.0],
"projection_price": [0.0],
"direction": [0.0],
"status": [0.0],
"status_reason": [0.0],
"pattern_index": [0.0],
"timestamp": [1708300800]
}Data is being fetched. Retry after 1–2 seconds.
Response
{ "pending": true, "key": "ta:binance:BTCUSDT:1h:inverseheadandshoulders:..." }Response
{ "error": "Missing required: exchange, symbol, timeframe" }Response
{ "error": "Invalid or missing API key." }Response
{ "error": "Rate limit exceeded. Your plan allows 30 requests per 15 seconds." }