Fair Value Gap (FVG)
Category: Support, resistance & structure · Updated November 2026
The TAAPI.IO Fair Value Gap API returns value, top, bottom, bullish top values for the Fair Value Gap (FVG) 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/fvg |
| Outputs | value, top, bottom, bullishTop, bullishBottom, bullishTimestamp and more |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get Fair Value Gap with one API call
This request returns Fair Value Gap for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/fvg \ -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/fvg',
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/fvg?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());Fair Value Gap API response
This response came from the live API on 9 November 2026. Long lists are shortened here.
{
"value": [0],
"top": [null],
"bottom": [null],
"bullishTop": [73668],
"bullishBottom": [73400],
"bullishTimestamp": [1787270400],
"bullishCount": [10],
"bearishTop": [74750],
"bearishBottom": [74655.24],
"bearishTimestamp": [1794200400],
"bearishCount": [17],
"timestamp": [1794218400]
}This response can be null or empty when there is nothing to report for the requested candles, so handle that case in your code.
| Field | Type | Description |
|---|---|---|
value | number[] | Gap confirmed on this candle: 1 bullish, -1 bearish, 0 none |
top | array | Upper edge of the gap confirmed on this candle (null if none) |
bottom | array | Lower edge of the gap confirmed on this candle (null if none) |
bullishTop | number[] | Upper edge of the most recent unfilled bullish gap (null if none) |
bullishBottom | number[] | Lower edge of the most recent unfilled bullish gap (null if none) |
bullishTimestamp | number[] | Timestamp of the middle candle of the most recent unfilled bullish gap |
bullishCount | number[] | Number of unfilled bullish gaps |
bearishTop | number[] | Upper edge of the most recent unfilled bearish gap (null if none) |
bearishBottom | number[] | Lower edge of the most recent unfilled bearish gap (null if none) |
bearishTimestamp | number[] | Timestamp of the middle candle of the most recent unfilled bearish gap |
bearishCount | number[] | Number of unfilled bearish gaps |
timestamp | integer[] | Unix time of each candle, in seconds |
Fair Value Gap 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 |
threshold | number | No | 0 | Minimum gap size as a percentage of the middle candle's close (0-100). Smaller gaps are ignored. |
fillMode | string | No | wick | When an open gap counts as filled: wick (price touches the far edge) or close (a candle closes beyond it). |
results | integer | No | 1 | Number of values to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is Fair Value Gap?
A Fair Value Gap is a three-candle imbalance where the wicks of the first and third candles do not overlap, which leaves a price zone that traded one-sidedly. The endpoint returns gaps as they form as well as the most recent unfilled bullish and bearish zones.
Fair Value Gap formula
| Output | Calculation |
|---|---|
| Bullish gap | Low of candle 3 above the high of candle 1 |
| Bearish gap | High of candle 3 below the low of candle 1 |
How to read Fair Value Gap in your code
| Signal | Meaning | Condition |
|---|---|---|
| New gap | Gap confirmed on this candle | value is 1 (bullish) or −1 (bearish) |
| Open bullish zone | Possible support | bullishTop to bullishBottom |
| Open bearish zone | Possible resistance | bearishTop to bearishBottom |
Limitations: Many gaps fill without a useful reaction, and small ones are common, so use threshold to filter noise. Nothing on this page is financial advice.
Read Fair Value Gap from Python
Use backtrack=1 to read the result as of the last closed candle.
curl -G https://v2.taapi.io/indicator/fvg \ -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/fvg',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h', 'backtrack': 1},
)
data = resp.json()
print(data['value'])Get historical Fair Value Gap 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/fvg \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get Fair Value Gap for multiple symbols
Combine Fair Value Gap 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": "fvg",
"indicator": "fvg"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream Fair Value Gap 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": "fvg",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "fvg"
}Fair Value Gap API FAQ
What does the Fair Value Gap API return?
It returns value, top, bottom, bullishTop, bullishBottom, bullishTimestamp, bullishCount, bearishTop, bearishBottom, bearishTimestamp, bearishCount, plus a timestamp for the request. Results are JSON.
Is the latest Fair Value Gap 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 Fair Value Gap settings can I change?
You can set threshold, fillMode. See the parameters table above for defaults.
Can I get Fair Value Gap 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
See the full list of indicators, or start for free.