Relative Strength Index (RSI)
Category: Momentum · Updated November 2026
The TAAPI.IO RSI API returns real-time and historical values for the Relative Strength Index 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/rsi |
| Outputs | value |
| 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. Long lists are shortened here.
{
"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 | Time Period |
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 |
|---|---|
| RS | Average gain ÷ average loss over the period |
| RSI | 100 − 100 ÷ (1 + RS) |
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 above 30 |
Limitations: In strong trends RSI can stay overbought or oversold for a long time, 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.
A common approach is to use a trend filter first, for example only taking oversold signals while price is above a 200-period EMA. 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}')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 |
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's
rsiuses TA-Lib's Wilder-smoothed calculation. 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?
It returns value, plus a timestamp for the request. 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.
Which RSI settings can I change?
You can set period. See the parameters table above for defaults.
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
See the full list of indicators, or start for free.