SuperTrend
Category: Trend · Updated November 2026
The TAAPI.IO SuperTrend API returns the SuperTrend line and its direction as JSON for crypto pairs and US stocks. Send an exchange, symbol and timeframe to get real-time or historical values, with no candles to download and no calculations to maintain.
What one request returns
- The line (
value): a price below the market in an uptrend and above it in a downtrend. Many traders use it as a trailing stop. - The direction (
valueAdvice):longorshort. When it changes from one candle to the next, the trend has flipped. - A series or several timeframes, with
resultsand/bulk: for example a 4-hour SuperTrend for entries and a daily SuperTrend for the trend, in one request.
So one call answers two questions: which way is the trend, and where would you get out?
Example: four whipsaws and one long short, 7 October to 14 November 2026
Request: one /bulk call for ETHUSDT on Binance, with SuperTrend on 4-hour candles (results=2, backtrack=1, so the last two closed candles) and on daily candles (backtrack=1, so yesterday). Sent at 21:55 UTC on 14 November with the default settings of 7 and 3.
| Candle | ETH close | Line | Advice | Reading |
|---|---|---|---|---|
| 4h, 14 Nov 12:00 | 1,841.23 | 2,014.42 | short | Line above price: downtrend |
| 4h, 14 Nov 16:00 | 1,835.09 | 1,980.20 | short | No flip. The line moved down, so the stop tightened |
| 1d, 13 Nov | 1,929.88 | 2,265.73 | short | The daily trend agrees |
How to interpret this: The 4-hour SuperTrend has been short since 5 November at 12:00, when ETH closed at 2,252.70. Since then ETH has fallen 18.5%, and the line has followed it down from 2,506.60 to 1,980.20. A short opened at that flip and closed at the line would now keep at least 12.1% of the move, even if ETH turned straight back up. That one leg is the reason traders use SuperTrend, but it came after four losing flips. ETH flipped seven times on the 4-hour chart since 7 October. The three long flips each reversed within two days, for losses of 4.6%, 3.3% and 3.2%. In between, short legs made 1.8% and 2.5% and lost 0.9%. All three long flips came while the daily SuperTrend was short, which it has been since 8 October. A trend-following bot that only took 4-hour flips in the daily direction would have skipped all three longs, and with them 11.1% of losses.
| Flip | Advice | ETH close | Next flip | Result | Daily trend |
|---|---|---|---|---|---|
| 7 Oct 00:00 | short | 2,611.14 | 12 Oct 04:00 | +1.8% | long until 8 Oct |
| 12 Oct 04:00 | long | 2,564.19 | 12 Oct 20:00 | −4.6% | short |
| 12 Oct 20:00 | short | 2,447.17 | 21 Oct 08:00 | −0.9% | short |
| 21 Oct 08:00 | long | 2,469.37 | 22 Oct 16:00 | −3.3% | short |
| 22 Oct 16:00 | short | 2,387.20 | 4 Nov 08:00 | +2.5% | short |
| 4 Nov 08:00 | long | 2,327.96 | 5 Nov 12:00 | −3.2% | short |
| 5 Nov 12:00 | short | 2,252.70 | still open | +18.5% | short |
Values are from the production API on 14 November 2026, using closed 4-hour candles. Results compare the close at one flip with the close at the next, with no fees. Seven flips are an illustration, not a backtest, and nothing here is financial advice.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/supertrend |
| Outputs | Line value, advice (long or short), timestamp |
| Default settings | Period 7, multiplier 3 |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get SuperTrend with one API call
This request returns SuperTrend for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/supertrend \ -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/supertrend',
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/supertrend?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());SuperTrend API response
Every value is returned in an array, even for a single candle. This response came from the live API on 9 November 2026.
{
"value": [75832.37560889388],
"valueAdvice": ["short"],
"timestamp": [1794218400]
}| Field | Type | Description |
|---|---|---|
value | number[] | The SuperTrend line: below price when long, above price when short |
valueAdvice | string[] | long or short |
timestamp | integer[] | Unix time of each candle, in seconds |
SuperTrend 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 |
period | integer | No | 7 | ATR period |
multiplier | number | No | 3 | ATR multiple between the candle midpoint and the line, e.g. 2.5 |
results | integer | No | 1 | Number of values to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is SuperTrend?
SuperTrend is a trailing line built from the Average True Range (ATR). It sits below price in an uptrend and above price in a downtrend, and flips when a candle closes through it. It is popular because it reduces a trend to one line and one state.
SuperTrend formula
| Step | Calculation |
|---|---|
| Basic upper band | (high + low) ÷ 2 + multiplier × ATR(period) |
| Basic lower band | (high + low) ÷ 2 − multiplier × ATR(period) |
| Final upper band | The basic upper band if it is lower than the previous final upper band, or if the previous close was above it. Otherwise the previous final upper band |
| Final lower band | The basic lower band if it is higher than the previous final lower band, or if the previous close was below it. Otherwise the previous final lower band |
| Direction | Flips to long when the close goes above the final upper band, and to short when it goes below the final lower band |
| SuperTrend | The final lower band while long, the final upper band while short |
ATR uses Wilder's smoothing. In the example above, the 14 November 16:00 candle had a high of 1,858.25 and a low of 1,811.29, so its midpoint was 1,834.77. With a 7-period ATR of 48.48, the basic upper band is 1,834.77 + 3 × 48.48 = 1,980.20. That is lower than the previous line of 2,014.42, so the line moved down to it.
How to read SuperTrend in your code
| Signal | Meaning | Condition |
|---|---|---|
| Uptrend | Line below price | valueAdvice is long |
| Downtrend | Line above price | valueAdvice is short |
| Flip | Trend changed on this candle | valueAdvice differs from the previous candle |
| Trailing stop | Exit level for the current trend | value |
| Stop distance | How much a reversal would give back | Gap between the close and value, as a percentage of the close |
Limitations: SuperTrend flips repeatedly in sideways markets, and after a volatile move the line can be far from price. In the example the stop was 7.9% above the close. Nothing on this page is financial advice.
How SuperTrend works
SuperTrend starts from the middle of each candle and adds or subtracts a multiple of ATR, producing an upper and a lower band. Only one is active at a time: the lower band during an uptrend and the upper band during a downtrend.
The active band can only tighten. In a downtrend the line can fall or stay flat but never rise, which is why it works as a trailing stop. In the example it stayed flat at 2,159.03 for nine candles between 10 and 12 November while ETH moved sideways, then started falling again with price. When a candle closes through the line, the direction flips and the opposite band takes over.
Choosing the period and multiplier
The multiplier has the larger effect. A smaller value keeps the line close to price, which gives earlier exits and more flips. A larger value gives moves more room but gives back more profit before it reacts.
The period sets how quickly the ATR adapts. SuperTrend works best in sustained trends and struggles in sideways markets, so a higher-timeframe filter, as below, or a trend-strength filter such as ADX can cut the number of flips. Backtest the settings on your own market, using results to fetch a series.
Detect a SuperTrend flip with Python
valueAdvice is long or short. A flip is the moment it changes between the last two closed candles.
curl -G https://v2.taapi.io/indicator/supertrend \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=2" \ --data-urlencode "backtrack=1"
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/supertrend',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h', 'results': 2, 'backtrack': 1},
)
data = resp.json()
prev, advice = data['valueAdvice']
line = data['value'][-1]
if prev != advice:
print(f'Flipped to {advice}, line at {line:.2f}')
else:
print(f'Still {advice}, line at {line:.2f}')Filter flips with the daily trend
On short timeframes most flips against the bigger trend fail quickly, as the three long flips in the example did. A common fix is to take a 4-hour flip only when the daily SuperTrend points the same way, or a 15-minute flip only when the 1-hour SuperTrend agrees. One /bulk request returns both. Two constructs need the Pro plan or above. On Basic, make two GET requests instead.
curl -X POST https://v2.taapi.io/bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"constructs": [
{
"id": "eth_4h",
"exchange": "binance",
"symbol": "ETHUSDT",
"timeframe": "4h",
"indicators": [
{
"id": "supertrend",
"indicator": "supertrend",
"results": 2,
"backtrack": 1
}
]
},
{
"id": "eth_1d",
"exchange": "binance",
"symbol": "ETHUSDT",
"timeframe": "1d",
"indicators": [
{
"id": "supertrend",
"indicator": "supertrend",
"backtrack": 1
}
]
}
]
}'import requests
payload = {
"constructs": [
{
"id": "eth_4h",
"exchange": "binance",
"symbol": "ETHUSDT",
"timeframe": "4h",
"indicators": [
{
"id": "supertrend",
"indicator": "supertrend",
"results": 2,
"backtrack": 1
}
]
},
{
"id": "eth_1d",
"exchange": "binance",
"symbol": "ETHUSDT",
"timeframe": "1d",
"indicators": [
{
"id": "supertrend",
"indicator": "supertrend",
"backtrack": 1
}
]
}
]
}
resp = requests.post(
'https://v2.taapi.io/bulk',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json=payload,
)
data = resp.json()
prev, last = data['eth_4h']['supertrend']['valueAdvice']
stop = data['eth_4h']['supertrend']['value'][-1]
daily = data['eth_1d']['supertrend']['valueAdvice'][-1]
if prev != last:
if last == daily:
print(f'4h flip to {last} with the daily trend, stop at {stop:.2f}')
else:
print(f'4h flip to {last} against the daily trend: skip')
else:
print(f'Still {last} (daily {daily}), stop at {stop:.2f}')The response at 21:55 UTC on 14 November. Both 4-hour candles are short, so there is no flip, and the script prints Still short (daily short), stop at 1980.20. Run at 12:05 UTC on 4 November, just after the 08:00 candle closed, the same script would have printed 4h flip to long against the daily trend: skip. Run it once per closed candle so you don't miss a flip.
{
"eth_4h": {
"supertrend": {
"value": [2014.4168386559516, 1980.1987188479584],
"valueAdvice": ["short", "short"],
"timestamp": [1794657600, 1794672000]
}
},
"eth_1d": {
"supertrend": {
"value": [2265.725376093564],
"valueAdvice": ["short"],
"timestamp": [1794528000]
}
}
}With this filter, the only 4-hour flips taken since 8 October were the three shorts: −0.9%, +2.5% and the open +18.5%. The filter still lets through a losing trade, as on 12 October, and it reacts late to a real change of trend, because the daily line is far from price: it was 2,265.73 on 13 November, 17% above the close. Other common filters: require ADX above 20, or check that price is on the same side of a 200-period EMA.
Get historical SuperTrend 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/supertrend \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get SuperTrend for multiple symbols
Combine SuperTrend 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": "supertrend",
"indicator": "supertrend"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream SuperTrend 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": "supertrend",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "supertrend"
}Common SuperTrend settings
These are starting points, not recommendations. Test any setting on your own market and timeframe.
| Settings | Character | Typical use |
|---|---|---|
| 7, 3 | API default | General use |
| 10, 3 | Common alternative | The default on many charting platforms |
| 10, 2 | Tighter | More flips, closer stops |
| 10, 4 | Looser | Fewer flips, more room in volatile markets |
Why SuperTrend values can differ between platforms
- Default settings: The API default is 7 and 3. Many charts default to 10 and 3.
- ATR method: TAAPI.IO uses Wilder's smoothed ATR. Some platforms use a simple average of the true range, which moves the line.
- Starting point: The line depends on where the calculation starts, so platforms that load a different amount of history can disagree for a while after a flip.
- Open candle: The advice can change on the forming candle. Use
backtrack=1to act only on closes.
SuperTrend API FAQ
What does the SuperTrend API return?
Three arrays: value with the line, valueAdvice with long or short, and a timestamp for each candle.
Is the latest SuperTrend value final?
No. The newest value belongs to the candle still forming, and the advice can flip and flip back before it closes. Add backtrack=1 to read the last closed candle.
How do I detect a SuperTrend flip?
Request results=2 with backtrack=1 and compare the two valueAdvice values. If they differ, the trend flipped on the last closed candle.
Can I use SuperTrend as a stop-loss?
Many traders do: value is the level where the trend would flip. Check the distance first. After a sharp move the line can be several percent away, as in the example above.
Which SuperTrend settings can I change?
You can set period and multiplier. The defaults are 7 and 3, and the multiplier accepts decimals such as 2.5.
Can I get SuperTrend 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
- Average True Range: the volatility measure behind the line
- Parabolic SAR: another trailing stop that flips sides
- Average Directional Index: trend strength, to filter flips
- Exponential Moving Average: a simple trend filter
Build with SuperTrend on Binance, Bybit or US stocks. Start for free or browse all 262 indicators.