RSI Divergence
Category: Divergence · Updated November 2026
The TAAPI.IO RSI Divergence API returns bull, hidden bull, bear, hidden bear values for the RSI Divergence 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/rsidivergence |
| Outputs | bull, hiddenBull, bear, hiddenBear, rsi |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get RSI Divergence with one API call
This request returns RSI Divergence for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/rsidivergence \ -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/rsidivergence',
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/rsidivergence?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());RSI Divergence API response
This response came from the live API on 9 November 2026. Long lists are shortened here.
{
"bull": [{"i": 70, "pivotIndex": 75, "prevPivotIndex": 91, "rsi": 29.007836413081264, "rsiPrev": 19.477523455576588, "price": 75304.11, "pricePrev": 75568, "label": "Bull"}],
"hiddenBull": [{"i": 456, "pivotIndex": 461, "prevPivotIndex": 472, "rsi": 52.93337542431902, "rsiPrev": 56.28989737100583, "price": 82635.32, "pricePrev": 82465.26, "label": "H Bull"}],
"bear": [{"i": 274, "pivotIndex": 279, "prevPivotIndex": 289, "rsi": 64.8803718324755, "rsiPrev": 69.74039941980062, "price": 81621.17, "pricePrev": 81558.01, "label": "Bear"}],
"hiddenBear": [{"i": 14, "pivotIndex": 19, "prevPivotIndex": 50, "rsi": 58.5823779043025, "rsiPrev": 51.81825793162302, "price": 76095.32, "pricePrev": 76195, "label": "H Bear"}],
"rsi": [0, 100],
"timestamp": [1787022000, 1787025600]
}| Field | Type | Description |
|---|---|---|
bull | object[] | Bull |
hiddenBull | object[] | Hidden bull |
bear | object[] | Bear |
hiddenBear | object[] | Hidden bear |
rsi | number[] | Rsi |
timestamp | integer[] | Unix time of each candle, in seconds |
RSI Divergence 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 | Period |
srcKey | string | No | close | Src key |
lbR | integer | No | 5 | Lb r |
lbL | integer | No | 14 | Lb l |
rangeUpper | integer | No | 60 | Range upper |
rangeLower | integer | No | 5 | Range lower |
plotBull | boolean | No | True | Plot bull |
plotHiddenBull | boolean | No | True | Plot hidden bull |
plotBear | boolean | No | True | Plot bear |
plotHiddenBear | boolean | No | True | Plot hidden bear |
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 Divergence?
This endpoint scans for all four RSI divergence types at once. A regular divergence is price and RSI disagreeing at a new extreme, suggesting a possible reversal. A hidden divergence suggests a trend continuing. Results include the RSI value.
RSI Divergence formula
| Output | Calculation |
|---|---|
| Pivots | RSI swing points confirmed with lbL candles to the left and lbR to the right |
| Range | Consecutive pivots must be between rangeLower and rangeUpper candles apart |
How to read RSI Divergence in your code
| Signal | Meaning | Condition |
|---|---|---|
| Regular bullish | Lower price low, higher RSI low | New entries in bull |
| Regular bearish | Higher price high, lower RSI high | New entries in bear |
| Hidden bullish | Higher price low, lower RSI low | New entries in hiddenBull |
| Hidden bearish | Lower price high, higher RSI high | New entries in hiddenBear |
Limitations: Confirmation needs lbR candles to the right of the pivot, so a divergence is only reported after that delay. Nothing on this page is financial advice.
Read RSI Divergence from Python
Use backtrack=1 to read the result as of the last closed candle.
curl -G https://v2.taapi.io/indicator/rsidivergence \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "backtrack=1"
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/rsidivergence',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h', 'backtrack': 1},
)
data = resp.json()
print(data['bull'])Get historical RSI Divergence 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/rsidivergence \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get RSI Divergence for multiple symbols
Combine RSI Divergence 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": "rsidivergence",
"indicator": "rsidivergence"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream RSI Divergence 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": "rsidivergence",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "rsidivergence"
}RSI Divergence API FAQ
What does the RSI Divergence API return?
It returns bull, hiddenBull, bear, hiddenBear, rsi, plus a timestamp for the request. Results are JSON.
Is the latest RSI Divergence 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 Divergence settings can I change?
You can set period, srcKey, lbR, lbL, rangeUpper, rangeLower. See the parameters table above for defaults.
Can I get RSI Divergence 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
- Relative Strength Index
- RSI Divergence – Bullish
- RSI Divergence – Bearish
- RSI Hidden Divergence – Bullish
- RSI Hidden Divergence – Bearish
See the full list of indicators, or start for free.