Bollinger Bands API
Bitcoin 4h Bollinger Bands (20, 2) — where price sits inside the envelope, and how wide the envelope is.
https://hunchmachine.com/api/indicators?indicator=bollinger_bands&api_key=YOUR_API_KEYDescription
Computes Bollinger Bands on Binance BTCUSDT 4-hour closes (20-period SMA, 2 standard deviations). Position inside the bands and relative width give automations a short-term stretch and squeeze read without reconstructing the oscillator from raw klines.
What this endpoint provides
Band levels, relative width, a 0–1 position of the latest close inside the envelope, and a zone label (mid, halves, extremes). Refreshed every 30 minutes so intra-bar location can move while the 4h candle is still forming.
Response fields
timeframeCandle interval used for the bands (4h).
latest_closeLatest BTCUSDT 4h close (includes the forming candle).
upper, middle, lowerUpper band, 20-period SMA, and lower band.
width_relBand width relative to the middle band: (upper − lower) / middle.
position_0_1Where price sits between lower (0) and upper (1), clamped to that range.
zoneQualitative location: upper_extreme, upper_half, mid, lower_half, lower_extreme.
summaryShort natural-language read of price vs the middle band and zone.
timestampUTC time of the latest update.
Output example
[
{
"indicator": "bollinger_bands",
"timestamp": "2026-09-21T13:00:00.000Z",
"timeframe": "4h",
"latest_close": 112450,
"upper": 114200,
"middle": 111000,
"lower": 107800,
"width_rel": 0.0577,
"position_0_1": 0.7266,
"zone": "upper_half",
"summary": "BTC 4h Bollinger: price 112450 vs mid 111000 (pos 0.73, upper_half)."
}
]Interpretation & Use
Upper_extreme / lower_extreme mark stretched 4h closes near or beyond the bands. Upper_half / lower_half are directional but not exhausted. Mid is mean-reversion territory. Rising width_rel is an expanding (trending) envelope; a squeeze shows up as a falling width_rel.