Double Top
Category: Chart patterns · Updated November 2026
The TAAPI.IO Double Top API finds the bearish Double Top: two peaks at about the same price with a pullback between them. The low of that pullback is the neckline. When price closes below it, the uptrend that built the peaks is considered over. 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 first top (
h1_*), the valley between the tops (l1_*) and the second top (h2_*), so you can draw the pattern. - The neckline: a flat level at the valley low (
neckline_level), and where to stop drawing it (neckline_right_timestamp). - The breakout and target: the candle that closed below the neckline, its close, and
projection_price, one pattern height below the neckline. - 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. The mirror image, a bullish bottom, is the Double Bottom.
Example: BTCUSDT, September to October 2026
Request: BTCUSDT on daily Binance candles with the default settings. This is the pattern it returned on 12 November 2026.
| Point | Price | Date (UTC) | What it is |
|---|---|---|---|
| First top | 87,395.67 | 21 Sep | A new swing high in the uptrend |
| Valley | 82,563.00 | 28 Sep | The pullback low between the tops: the neckline |
| Second top | 87,220.00 | 2 Oct | 175.67 below the first top, 0.08 ATR, so the two count as equal |
| Breakout | 81,754.45 | 8 Oct | First daily close below the neckline |
| Target | 77,730.33 | — | Neckline − (first top − neckline) = 82,563 − 4,832.67 |
How to interpret this: Bitcoin rallied to 87,396 on 21 September, fell back to 82,563 a week later, then rallied again and stalled at 87,220 on 2 October, 176 short of the first top. Buyers had tried the same level twice and failed. On 8 October a daily candle closed at 81,754, below the valley low, and the API marked the pattern confirmed. The measured move takes the height of the first top above the neckline, 4,833, and subtracts it from the neckline, which gives 77,730. It was not a straight line down: the very next day closed back above the neckline at 82,636, and on 21 October price reached 84,898, still below the second top. It fell through the target on 30 October and traded at 71,897 on 12 November.
The second top is only known 5 candles after it prints (with the default depth of 10), so this pattern first appeared on 7 October as forming and turned confirmed the next day. Price reaching the target here does not mean it always will; see a pattern that failed. Example for illustration only, not financial advice.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/doubletop |
| Outputs | h1_price, l1_price, h2_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 Double Top with one API call
This request returns Double Top for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/doubletop \ -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/doubletop',
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/doubletop?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());Double Top API response
Example for BTCUSDT on daily Binance candles: the pattern charted above, from a default request on 12 November 2026.
{
"h1_timestamp": [1789948800],
"h1_price": [87395.67],
"l1_timestamp": [1790553600],
"l1_price": [82563],
"h2_timestamp": [1790899200],
"h2_price": [87220],
"neckline_level": [82563],
"neckline_right_timestamp": [1791417600],
"breakout_occurred": [true],
"is_confirmed": [true],
"breakout_timestamp": [1791417600],
"breakout_price": [81754.45],
"breakout_neckline_price": [82563],
"projection_price": [77730.33],
"direction": ["bearish"],
"status": ["confirmed"],
"status_reason": ["breakout_below_neckline"],
"pattern_index": [12],
"timestamp": [1794441600]
}Reading this response
neckline_levelis exactlyl1_price, 82,563: the wick low of the 28 September candle. That candle's body ended at 83,500.01; withsource=bodythe valley, and so the neckline, would sit there instead.- The pattern height is
h1_price−neckline_level= 87,395.67 − 82,563 = 4,832.67, about 2.1 ATR. The minimum is 1.5 ATR. - The breakout close, 81,754.45, is below the neckline, so
statusisconfirmed. Because the neckline is flat,breakout_neckline_priceis the same 82,563. projection_price= 82,563 − 4,832.67 = 77,730.33.- Because the pattern is confirmed,
neckline_right_timestampis the breakout candle.pattern_index12 means it is the twelfth double top in the BTC daily candles the API looked at;results=maxreturns all twelve.
| Field | Type | Description |
|---|---|---|
h1_timestamp, h1_price | integer[], number[] | First top: Unix time in seconds, and the swing high |
l1_timestamp, l1_price | integer[], number[] | The valley between the two tops. Its low is the neckline |
h2_timestamp, h2_price | integer[], number[] | Second top. A price above it before the breakout invalidates the pattern |
neckline_level | number[] | The flat neckline, equal to l1_price. The breakout is tested against this level |
neckline_right_timestamp | integer[] | Where to stop drawing the neckline: the breakout candle if confirmed, the candle that invalidated it, or 20 candles after the second top |
breakout_occurred, is_confirmed | boolean[] | true once a candle closed below the neckline |
breakout_timestamp | (integer or null)[] | Unix time of that candle |
breakout_price | (number or null)[] | Its close. Always below neckline_level |
breakout_neckline_price | (number or null)[] | The neckline at the breakout candle, the same as neckline_level. Set only when confirmed |
projection_price | (number or null)[] | Target: neckline_level − (h1_price − neckline_level). 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 used |
Prices are swing highs and lows on candle wicks. With source=body they are candle bodies instead (the higher of open and close for the tops, the lower for the valley), and the neckline moves with them.
Status and status_reason
| status | status_reason | Meaning |
|---|---|---|
forming | awaiting_breakout | The second top is in place and price has not closed below the neckline yet |
confirmed | breakout_below_neckline | A candle closed below the neckline within 20 candles of the second top. Confirmation is permanent: what price does afterwards does not change it |
invalidated | bullish_structure_resumed | Before any breakout, price went above the second top. Buyers are still in charge; a later break of the neckline is ignored |
invalidated | breakout_timeout | 20 candles after the second top and still no close below the neckline |
The API checks each candle after the second top in order, and the first event decides: a high above the second top, or a close below the neckline. Once decided, the status stays the same as new candles arrive. The default results=1 returns only the last pattern, 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.
Double Top 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 high must be the highest of 5 candles on each side, and appears 5 candles late. Raise it for larger, slower patterns |
deviationATR | number | No | 1 | Minimum move between two swings, in multiples of ATR (or percent with deviationType=percent). Smaller swings are merged |
deviationType | string | No | atr | atr or percent, the unit of deviationATR |
source | string | No | wick | wick uses highs and lows for the swings and the neckline; body uses open and close |
heikinashi | boolean | No | false | 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 | Period of the ATR that all the thresholds below are measured in |
topToleranceATR | number | No | 0.75 | Largest allowed difference between the two tops, in ATR |
minHeightATR | number | No | 1.5 | Minimum drop, in ATR, from the first top to the valley |
symmetryMin | number | No | 0.3 | Minimum ratio of candles from first top to valley, over candles from valley to second top |
symmetryMax | number | No | 4 | Maximum of that ratio |
breakoutLookahead | integer | No | 20 | Candles after the second top to wait for a close below the neckline |
necklineBuffer | number | No | 0.1 | How far, in ATR, a candle may close below the neckline between the valley and the second top before the pattern is rejected |
results | integer | No | 1 | Number of patterns to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is the Double Top?
The Double Top is a bearish reversal pattern that forms at the end of an uptrend. Price makes a high, pulls back, and rallies again to about the same high, where it stalls a second time. The pullback between the two peaks marks a floor, the neckline. As long as price stays above it, the market is only ranging under resistance. A close below it says buyers have failed twice at the same level and sellers have taken over the floor too.
How traders use it
Most traders wait for the close below the neckline rather than selling the second top, because many second tops turn into breakouts to new highs. On the break they sell or go short, put a stop above the second top, and aim for the measured move: the distance from the tops down to the neckline, projected down from the neckline. Some wait for price to come back up and retest the neckline from below, which happened in the BTC example the day after the break. Two equal highs after a long rally mean more than two equal highs in a sideways range.
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 |
| Sequence | Three swings in a row: a higher high (first top), a higher low (valley), and any high (second top) |
| Uptrend | At least one earlier higher high and one earlier higher low in the candles |
| Equal tops | The two tops within 0.75 ATR of each other |
| Height | The valley at least 1.5 ATR below the first top |
| Timing | First top to valley takes between 0.3 and 4 times as many candles as valley to second top |
| Neckline | Flat, at the valley low. No candle between the valley and the second top closes more than 0.1 ATR below it |
| Breakout | The first close below the neckline within 20 candles of the second top, as long as no candle went above the second top first |
| Target | Neckline − (first top − neckline) |
The ATR is measured at the swing being tested, so the same defaults work on a 1-minute chart and a weekly one. The numbers in the table are the defaults; each has a parameter above.
How to read Double Top in your code
| Signal | Meaning | Condition |
|---|---|---|
| Breakdown | Price closed below the neckline | status is confirmed |
| Fresh signal | Breakdown on the latest candles | breakout_timestamp is close to timestamp |
| Setup to watch | Two tops in place, waiting for the break | status is forming; watch for a close below neckline_level |
| Target | Measured move | projection_price |
| Stop | Where the pattern is clearly wrong | Above h2_price, the second top |
| Failed setup | Pattern no longer valid | status is invalidated; see status_reason |
Act on a fresh Double Top breakdown with Python
This reads the latest pattern as of the last closed daily candle (backtrack=1) and only acts on a breakdown from the last few candles. It uses projection_price as the target, the second top as the stop, and the neckline as an early warning.
curl -G https://v2.taapi.io/indicator/doubletop \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1d" \ --data-urlencode "backtrack=1"
import requests
API = 'https://v2.taapi.io'
HEADERS = {'Authorization': 'Bearer YOUR_API_KEY'}
market = {'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1d', 'backtrack': 1}
CANDLE = 24 * 3600 # seconds per candle for this timeframe
FRESH = 3 # only act on breakouts from the last 3 closed candles
p = requests.get(f'{API}/indicator/doubletop', headers=HEADERS, params=market).json()
if not p or not p.get('status'):
print('No double top in the candles')
elif p['status'][0] != 'confirmed':
print('Latest pattern:', p['status'][0], p['status_reason'][0])
else:
now = p['timestamp'][0] # the last closed candle
age = (now - p['breakout_timestamp'][0]) // CANDLE
if age > FRESH:
print(f'Breakout is {age} candles old, too late to act on')
else:
print(f"Short signal, breakout {age} candles ago at {p['breakout_price'][0]:,.2f}")
print(f"Target: {p['projection_price'][0]:,.2f}")
print(f"Stop: above the second top, {p['h2_price'][0]:,.2f}")
print(f"Neckline: {p['neckline_level'][0]:,.2f}; a close back above it is a warning")Why the age check: the second top is only known depth/2 candles after it prints, so a fast breakdown can already be a few candles old the first time you see the pattern. In the BTC example above the pattern was visible a day before the break. Decide how late is too late for your strategy.
A pattern that worked and one that failed
Two confirmed patterns from the default settings, both clean on a chart.
| BTCUSDT 1d, Sep–Oct 2026 | SOLUSDT 1d, September 2026 | |
|---|---|---|
| Tops | 87,396 / 87,220 | 110.60 / 107.36 |
| Neckline | 82,563 | 97.38 |
| Breakout close | 81,754 (8 Oct) | 96.88 (15 Sep) |
| Target | 77,730 | 84.16 |
| What followed | Back above the neckline the next day; 84,898 on 21 Oct, under the second top; target reached 30 Oct | Back above the neckline the next day; above the second top on 18 Sep; 124.95 on 27 Sep; target reached only on 10 Nov |
BTC retested the neckline from below the day after the break and failed to get back near the tops. SOL broke its neckline by half a dollar on 15 September, closed back above it the next day, and on 18 September traded at 114.32, above both tops. A trader with a stop above 107.36 was out three days after the signal. SOL then ran to 124.95 before finally falling through the old target almost two months later, long after the pattern had done its damage.
A third pattern never got that far. On ETHUSDT 1d in August 2026, the tops were 1,981.24 and 1,943.02 with a neckline at 1,822.06. Price never closed below the neckline: on 19 August it traded up to 2,333.65, above the second top, and the API marked the pattern invalidated with bullish_structure_resumed.
How often the target is reached: across BTC, ETH and SOL at 1h, 4h and 1d, and AAPL, AMZN, MSFT, NVDA, SPY and TSLA at 1h and 1d (2,000 candles each, default settings), the API found 145 double tops. 79 were confirmed, 50 were invalidated by a high above the second top, 14 timed out and 2 were still forming. Of the 79 confirmed, 44 reached their target before price got back above the second top; 35 did not. That ignores costs and slippage and mixes very different markets. Treat the target as a reference level, not a promise.
Examples for illustration only, not financial advice.
Limitations:
- Swings need
depth/2 candles to confirm, so the second top, and sometimes the breakout, appear with a delay. - The first top must be a new high and the valley a higher low. A double top whose first peak sits below an earlier spike is not found. Loosen
topToleranceATRor lowerminHeightATRto find more, less clean patterns. - The neckline is the valley's wick low. One long wick puts it lower than most traders would draw it. Use
source=bodyif you draw necklines through candle bodies. - The target is measured from the first top. When the second top is higher, the real height is a little larger than the one used.
- Rarely, a swing that forms after a breakout redraws the second top and the pattern is no longer returned. Store confirmed patterns on your side if you need a permanent record.
- Patterns run on real candles; add
heikinashi=truefor 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.
Get historical Double Top 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/doubletop \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get Double Top for multiple symbols
Combine Double Top 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": "doubletop",
"indicator": "doubletop"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream Double Top 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": "doubletop",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "doubletop"
}Double Top API FAQ
What does the Double Top API return?
For each pattern: the two tops and the valley between them, the flat 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 the neckline within 20 candles of the second top, before any candle has gone above the second top. A wick below is not enough. Once confirmed, the status does not change. Add backtrack=1 to ignore the candle that is still forming.
How is the target calculated?
Take the height of the first top above the neckline (h1_price − neckline_level) and subtract it from the neckline. The result is projection_price.
How equal do the two tops have to be?
Within 0.75 ATR of each other by default, measured at the second top. The second top can be a little higher or a little lower than the first. Change it with topToleranceATR.
Why did I get an invalidated pattern?
The default returns the most recent pattern, whatever its status. Double tops are common: the API found 145 in 21 test data sets of 2,000 candles, and more than a third were invalidated. Add results=max and keep the ones with status confirmed or forming.
Can I get Double Top 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
- Double Bottom: the bullish mirror
- Head and Shoulders: three peaks instead of two
- Advanced Bearish Patterns: all bearish chart patterns in one call
See the full list of indicators, or start for free.