Relative Strength Index (RSI)
Category: Momentum · Updated November 2026
The TAAPI.IO RSI API returns the Relative Strength Index as JSON for crypto pairs and US stocks. Send an exchange, symbol and timeframe to get real-time or historical RSI values, with no candles to download and no calculations to maintain.
What one request returns
- The RSI value (
value), from 0 to 100. Readings above 70 are usually called overbought and readings below 30 oversold. - A series, with
results: one value per candle, oldest first, to see when RSI crossed a level or how long it has stayed there. - Several timeframes at once, with
/bulk: for example a 4-hour RSI for the signal and a daily RSI for the trend, in one request.
So one call answers two questions: how stretched is the move, and is it still stretching?
Example: oversold for two days in a falling market, 14 November 2026
Request: one /bulk call for BTCUSDT on Binance, with RSI on 4-hour candles (results=3, backtrack=1, so the last three closed candles) and on daily candles (backtrack=1, so yesterday). Sent at 21:55 UTC with the default period of 14.
| Candle | BTC close | RSI | Reading |
|---|---|---|---|
| 4h, 14 Nov 08:00 | 67,272.79 | 23.39 | Oversold |
| 4h, 14 Nov 12:00 | 65,742.01 | 19.30 | Lower close, lower RSI |
| 4h, 14 Nov 16:00 | 65,727.61 | 19.26 | 14th closed candle in a row below 30 |
| 1d, 13 Nov | 68,314.00 | 24.47 | The daily chart is oversold too |
How to interpret this: A reading below 30 is the textbook buy signal, and it has been showing since 12 November at 12:00, when BTC closed at 71,710. Fourteen closed candles later, by 16:00 on 14 November, BTC was 8.3% lower at 65,728, and RSI had dropped as low as 16.7. In a falling market, oversold describes how fast price is falling. It doesn't mean the fall is ending. The earlier oversold readings in this downtrend tell the same story. On 24 October and 9 November RSI dipped below 30 for a candle or two, and BTC bounced 1.0% and 1.3% over the next day. Neither bounce lasted: BTC was 17.6% and 11% lower by 14 November. The daily RSI has closed below 50 every day since 22 October except 4 November, when it reached 50.6. A bot following the trend would treat a 4-hour oversold reading as, at best, a short bounce. The stricter rule, waiting for RSI to close back above 30, hasn't fired since 12 November, so it stayed out of the whole 8.3% drop.
| First close below 30 | BTC close | RSI | One day later | By 14 Nov 16:00 |
|---|---|---|---|---|
| 8 Oct 00:00 | 82,757.00 | 28.8 | −0.4% | −20.6% |
| 24 Oct 12:00 | 79,803.75 | 29.0 | +1.0% | −17.6% |
| 9 Nov 04:00 | 73,870.02 | 25.0 | +1.3% | −11.0% |
| 12 Nov 12:00 | 71,710.05 | 27.2 | −3.9% | −8.3% |
Values are from the production API on 14 November 2026, using closed 4-hour candles from 8 October. "One day later" compares the close six candles on. Four oversold spells are an illustration, not a backtest, and nothing here is financial advice.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/rsi |
| Outputs | RSI value, timestamp |
| Default settings | Period 14 |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get RSI with one API call
This request returns RSI for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/rsi \ -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/rsi',
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/rsi?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());RSI API response
This response came from the live API on 9 November 2026.
{
"value": [36.329579709987705],
"timestamp": [1794218400]
}| Field | Type | Description |
|---|---|---|
value | number[] | RSI result |
timestamp | integer[] | Unix time of each candle, in seconds |
RSI 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 | 14 | Number of candles in the average gain and loss |
results | integer | No | 1 | Number of values to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is RSI?
The Relative Strength Index, developed by J. Welles Wilder and published in 1978, is a momentum oscillator that measures the speed of recent price changes on a scale of 0 to 100. It compares the average gain with the average loss over a period, usually 14 candles.
RSI formula
| Output | Calculation |
|---|---|
| Change | Close − previous close, split into a gain or a loss |
| Average gain and loss | (previous average × 13 + current value) ÷ 14 |
| RS | Average gain ÷ average loss |
| RSI | 100 − 100 ÷ (1 + RS) |
Turned around, RS = RSI ÷ (100 − RSI). In the response above, RSI 36.33 gives an RS of 0.57: over the last 14 candles, the average gain was 57% of the average loss. The 4-hour reading of 19.26 in the example gives 0.24, so the average loss was about four times the average gain.
How to read RSI in your code
| Signal | Meaning | Condition |
|---|---|---|
| Overbought | Price may be stretched to the upside | value above 70 |
| Oversold | Price may be stretched to the downside | value below 30 |
| Momentum bias | Which side has recent control | value above or below 50 |
| Exit from oversold | Selling pressure easing | value moves from below 30 to 30 or above |
| Exit from overbought | Buying pressure easing | value moves from above 70 to 70 or below |
Limitations: In strong trends RSI can stay overbought or oversold for a long time, as in the example above, so a 70 or 30 reading on its own is not a reversal signal. Nothing on this page is financial advice.
How RSI is calculated
RSI starts with the change between each close and the one before it. Gains and losses are averaged separately over the period, then Wilder's smoothing carries those averages forward: the new average gain is the previous average times 13, plus the current gain, divided by 14.
The ratio of average gain to average loss is the relative strength. The final formula squeezes it into a range of 0 to 100. If there were no losses at all in the window, RSI reads 100, and if there were no gains, it reads 0.
Using RSI in trending markets
The 70 and 30 levels work best when a market is moving sideways. In a strong uptrend RSI often holds between 40 and 80, and in a strong downtrend between 20 and 60, so treating 70 as a sell signal can mean selling early in a rally, and treating 30 as a buy signal can mean buying early in a sell-off.
A common approach is to check the trend first, for example with a daily RSI above 50 or price above a 200-period EMA, and only take oversold signals in that direction. To find disagreements between price and momentum, the RSI divergence endpoint returns them directly, so you don't need to write the pivot detection yourself.
Detect RSI overbought and oversold exits with Python
Waiting for RSI to leave an extreme is stricter than reacting to the first reading above 70 or below 30. This compares the last two closed candles.
curl -G https://v2.taapi.io/indicator/rsi \ -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/rsi',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h', 'results': 2, 'backtrack': 1},
)
data = resp.json()
prev, last = data['value']
if prev < 30 <= last:
print('RSI left oversold')
elif prev > 70 >= last:
print('RSI left overbought')
else:
print(f'No signal, RSI is {last:.2f}')Filter oversold signals with a higher timeframe
Short-timeframe oversold readings are common in a downtrend, and most of them lead to small bounces at best, as in the example above. A common fix is to take an exit from oversold only when a higher timeframe agrees: a 4-hour signal with the daily RSI at 50 or above, or a 15-minute signal with the 1-hour RSI at 50 or above. 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": "btc_4h",
"exchange": "binance",
"symbol": "BTCUSDT",
"timeframe": "4h",
"indicators": [
{
"id": "rsi",
"indicator": "rsi",
"results": 2,
"backtrack": 1
}
]
},
{
"id": "btc_1d",
"exchange": "binance",
"symbol": "BTCUSDT",
"timeframe": "1d",
"indicators": [
{
"id": "rsi",
"indicator": "rsi",
"backtrack": 1
}
]
}
]
}'import requests
payload = {
"constructs": [
{
"id": "btc_4h",
"exchange": "binance",
"symbol": "BTCUSDT",
"timeframe": "4h",
"indicators": [
{
"id": "rsi",
"indicator": "rsi",
"results": 2,
"backtrack": 1
}
]
},
{
"id": "btc_1d",
"exchange": "binance",
"symbol": "BTCUSDT",
"timeframe": "1d",
"indicators": [
{
"id": "rsi",
"indicator": "rsi",
"backtrack": 1
}
]
}
]
}
resp = requests.post(
'https://v2.taapi.io/bulk',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json=payload,
)
data = resp.json()
prev, last = data['btc_4h']['rsi']['value']
daily = data['btc_1d']['rsi']['value'][-1]
if prev < 30 <= last:
if daily >= 50:
print('4h RSI left oversold with the daily trend: buy signal')
else:
print(f'4h RSI left oversold, but daily RSI is {daily:.1f}: bounce in a downtrend, skip')
elif last < 30:
print(f'Still oversold ({last:.1f}): wait for a close back above 30')
else:
print(f'No signal, 4h RSI is {last:.1f}')The response at 21:58 UTC on 14 November. Both 4-hour values are below 30 and the daily RSI is 24.47, so the script prints Still oversold (19.3): wait for a close back above 30. Run it once per closed candle so you don't miss a signal.
{
"btc_4h": {
"rsi": {
"value": [19.297949087850508, 19.26377488056952],
"timestamp": [1794657600, 1794672000]
}
},
"btc_1d": {
"rsi": {
"value": [24.46735547666837],
"timestamp": [1794528000]
}
}
}The filter isn't perfect. Daily RSI closed at 52.9 on 7 October, so on 8 October it let through both exit signals, at 82,998.75 and 81,775.52. A day later BTC was 0.4% lower and 0.7% higher, and five weeks later about 20% lower. Every later exit signal came with the daily RSI below 50, so the filter skipped them all. Other common filters: require RSI to stay above 30 for two closed candles, or combine it with a MACD crossover.
Get historical RSI 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/rsi \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get RSI for multiple symbols
Combine RSI 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": "rsi",
"indicator": "rsi"
},
{
"id": "macd",
"indicator": "macd"
}
]
}
]
}'Stream RSI 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": "rsi",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "rsi"
}Common RSI settings
These are starting points, not recommendations. Test any setting on your own market and timeframe.
| Settings | Character | Typical use |
|---|---|---|
| 14 | Standard | Default, as published by Wilder |
| 7 to 9 | Faster, more signals | Short intraday charts |
| 21 to 25 | Slower, fewer signals | Swing and position trading |
| 2 | Very fast | Short-term mean reversion, often with levels of 10 and 90 |
Why RSI values can differ between platforms
- Exchange data: RSI uses closes from the exchange you request, so a Binance value will differ from another venue.
- Open candle: The newest value moves until the candle closes. Compare closed candles with
backtrack=1. - Smoothing and history: TAAPI.IO uses Wilder's smoothing, as in the formula above. Wilder's averages carry a long memory, so platforms that start from a different amount of history can show slightly different numbers, and some tools use a simple or exponential average instead.
RSI API FAQ
What does the RSI API return?
An array of RSI values in value, plus a timestamp for each candle. Results are JSON.
Is the latest RSI 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.
Is RSI below 30 a buy signal?
Not on its own. In a downtrend RSI can stay below 30 for many candles while price keeps falling. In the example above it stayed there for 14 closed 4-hour candles while BTC fell 8.3%. Waiting for RSI to close back above 30, and checking a higher timeframe, filters out many of these. See Filter oversold signals with a higher timeframe.
Which RSI settings can I change?
You can set period. The default is 14.
Can I get RSI for US stocks?
Yes. Use exchange=stocks with a ticker such as AAPL. US stocks are included on the Pro plan and above.
Can I detect RSI divergence with the API?
Yes. The rsidivergence endpoint returns regular and hidden bullish and bearish divergences along with the RSI value.
What is a good RSI period?
14 is the standard. Shorter periods such as 7 react faster and reach the extremes more often. Longer periods such as 21 are steadier. Test any choice on your own market and timeframe.
Related indicators
- Stochastic RSI: RSI rescaled to its own recent range
- RSI Divergence: price and RSI disagreeing, detected for you
- MACD: momentum from two moving averages
- Money Flow Index: an RSI that includes volume
- Commodity Channel Index: distance from a moving average
Build with RSI on Binance, Bybit or US stocks. Start for free or browse all 262 indicators.