Detecting a Gamma Squeeze in Real Time: The 0DTE Dealer Hedge-Flow API | FlashAlpha

Detecting a Gamma Squeeze in Real Time: The 0DTE Dealer Hedge-Flow API

A gamma squeeze is dealers being forced to buy into strength to stay hedged. The FlashAlpha 0DTE hedge-flow endpoint quantifies exactly that, the signed delta-dollars dealers are inferred to be buying or selling each bar to stay hedged on today's expiry, as per-bar increments and a running cumulative, splittable into calls, puts, or both. Growth plan.

T
Tomasz Dobrowolski Quant Engineer
Jun 13, 2026
26 min read
0DTE GammaSqueeze DealerHedging Flow API DeveloperGuide Python

If you are looking for a way to detect a gamma squeeze with an API, to measure dealer hedging pressure intraday, to chart dealer delta-dollar hedge flow, or to see whether 0DTE dealers are chasing or fading the tape, this is the reference. The FlashAlpha GET /v1/flow/zero-dte/hedge-flow/{symbol} endpoint returns the estimated dealer hedge-flow time series for today's 0DTE chain, signed delta-dollars per bar and a running cumulative, on the Growth plan. For the concept behind the mechanics, see Gamma Squeeze Explained; this article is the API that measures it.

Read this first. Hedge flow is an estimate, the signed delta-dollars dealers are inferred to be buying or selling to stay hedged, derived from the FlashAlpha flow model. It is not a window into any dealer's actual book. It covers today's 0DTE expiry only (the chain expiring today, ET). The JSON below is an illustrative shape with placeholder numbers. Use the sign, the bursts, and the cumulative trend as a relative pressure read, not as exact dealer order flow.


The Mechanic Behind a Squeeze

When dealers are net short gamma, their hedge is directional and pro-cyclical:

  • Price rises → their short-gamma position loses delta → they buy the underlying to re-hedge → that buying pushes price up further.
  • Price falls → they sell to re-hedge → that selling pushes price down further.

That feedback loop is the squeeze. The hedge-flow endpoint turns it into a number: bars[].bar is the signed delta-dollars dealers are inferred to be transacting in that bucket, and bars[].cumulative is the running sum since the session open. A steeply rising cumulative with the same-signed price move is the fingerprint of dealers chasing, amplifying, rather than fading.

Quantify dealer hedging pressure on today's 0DTE chain, bar by bar

Signed delta-dollars per bar plus a running cumulative. Calls, puts, or both. Growth plan.

Get API Access

Quick Start

Path is the symbol (0DTE-active names: SPY, SPX, QQQ). Optional side projects to all (default), calls, or puts; bar picks the bucket size (30s, 1m, 5m, 15m); minutes is the lookback (1-390, default 60).

from flashalpha import FlashAlpha

fa = FlashAlpha("YOUR_API_KEY")

d = fa.flow_zero_dte_hedge_flow("SPY", side="all", bar="5m", minutes=180)

bars = d["bars"]
if bars:
    last = bars[-1]
    print(f"SPY 0DTE hedge flow ({d['side']}, {d['bar_size']})")
    print(f"  latest bar: {last['bar']:,.0f} delta-$   cumulative: {last['cumulative']:,.0f}")
import { FlashAlpha } from 'flashalpha';

const fa = new FlashAlpha('YOUR_API_KEY');

const d = await fa.flowZeroDteHedgeFlow('SPY', { side: 'all', bar: '5m', minutes: 180 });

const last = d.bars.at(-1);
if (last) {
  console.log(`SPY 0DTE hedge flow (${d.side}, ${d.bar_size})`);
  console.log(`  latest bar: ${last.bar.toLocaleString()} delta-$  cumulative: ${last.cumulative.toLocaleString()}`);
}
using FlashAlpha;

var client = new FlashAlphaClient("YOUR_API_KEY");

var data = await client.FlowZeroDteHedgeFlowAsync("SPY", side: "all", bar: "5m", minutes: 180);

foreach (var b in data.GetProperty("bars").EnumerateArray())
    Console.WriteLine($"{b.GetProperty("t").GetString()}  bar={b.GetProperty("bar").GetDouble():N0}  cum={b.GetProperty("cumulative").GetDouble():N0}");
package main

import (
    "context"
    "fmt"

    flashalpha "github.com/FlashAlpha-lab/flashalpha-go"
)

func main() {
    fa := flashalpha.NewClient("YOUR_API_KEY")

    d, err := fa.FlowZeroDteHedgeFlow(context.Background(), "SPY",
        flashalpha.WithZeroDteFlowSide("all"),
        flashalpha.WithZeroDteFlowBar("5m"),
        flashalpha.WithZeroDteFlowMinutes(180))
    if err != nil {
        panic(err)
    }

    for _, raw := range d["bars"].([]interface{}) {
        b := raw.(map[string]interface{})
        fmt.Printf("%v  bar=%v  cum=%v\n", b["t"], b["bar"], b["cumulative"])
    }
}
# Combined call+put hedge flow, 5-minute bars, last 3 hours
curl -H "X-Api-Key: YOUR_KEY" \
  "https://lab.flashalpha.com/v1/flow/zero-dte/hedge-flow/SPY?side=all&bar=5m&minutes=180"

# Isolate the call leg to attribute one-sided hedging
curl -H "X-Api-Key: YOUR_KEY" \
  "https://lab.flashalpha.com/v1/flow/zero-dte/hedge-flow/SPY?side=calls&bar=1m"
$ pip install flashalpha  |  npm install flashalpha  |  dotnet add package FlashAlpha  |  go get github.com/FlashAlpha-lab/flashalpha-go

Response Shape

An illustrative shape with placeholder numbers, bars ascend by timestamp:

{
  "symbol": "SPY",
  "expiration": "2026-06-13",
  "as_of": "2026-06-13T18:45:12Z",
  "side": "calls",
  "bar_size": "5m",
  "bars": [
    { "t": "2026-06-13T18:40:00Z", "bar": 1240000, "cumulative": 18432000 }
  ]
}
FieldWhat it means
expirationToday's 0DTE expiry (ET), the chain this flow is hedging.
sideEchoes the requested leg: all sums calls and puts; calls / puts isolate one.
bar_sizeEchoes the requested bucket size.
bars[].barPer-bar signed delta-dollars dealers are inferred to transact in that bucket. Positive = net buying, negative = net selling.
bars[].cumulativeRunning sum since session open for the requested side. This is the line you chart.

Note: there is no special "no session" envelope. Outside a 0DTE session, or before any samples exist, you get a normal 200 with an empty bars array, always guard for that.

How To: Flag a Squeeze Building

The squeeze signature is consecutive same-signed bars with an accelerating cumulative. A simple detector watches for a run of bars all pushing the same direction with rising magnitude:

from flashalpha import FlashAlpha

fa = FlashAlpha("YOUR_API_KEY")

d = fa.flow_zero_dte_hedge_flow("SPY", side="all", bar="1m", minutes=30)
bars = d.get("bars", [])

# Look at the last N bars: same sign + rising magnitude = hedging accelerating
N = 5
recent = bars[-N:]
if len(recent) == N:
    signs = {1 if b["bar"] > 0 else -1 if b["bar"] < 0 else 0 for b in recent}
    mags  = [abs(b["bar"]) for b in recent]
    one_sided   = len(signs) == 1 and 0 not in signs
    accelerating = all(mags[i] <= mags[i + 1] for i in range(len(mags) - 1))

    if one_sided and accelerating:
        direction = "BUYING (upside squeeze)" if recent[-1]["bar"] > 0 else "SELLING (downside squeeze)"
        print(f"SQUEEZE BUILDING: {N} bars of accelerating dealer {direction}")
        print(f"  cumulative now: {recent[-1]['cumulative']:,.0f} delta-$")
    else:
        print("No squeeze pattern - hedging is two-sided or decelerating")

Tighten or loosen this however your strategy needs: require a minimum per-bar magnitude to filter noise, demand the same-signed price move to confirm dealers are chasing not fading, or watch for the bar sign flipping as the moment hedging reverses (which often coincides with a gamma-flip cross).

How To: Attribute Call vs Put Hedging

The same delta-dollar move can come from call hedging or put hedging, and they mean different things. Call the endpoint twice, side=calls and side=puts, and compare the cumulatives. A cumulative driven almost entirely by the call leg is upside call-chasing (a classic meltup signature); one driven by puts is downside protection-driven hedging. The side=all total can mask a one-sided story that the split reveals.

How To: Read It Against Price

The single most useful chart is cumulative overlaid on the underlying:

  • Cumulative rising with price → dealers are buying into strength: amplifying, squeeze-prone.
  • Cumulative falling with price → dealers are selling into weakness: amplifying to the downside.
  • Cumulative flat or moving against price → dealers are absorbing/fading: dampened, mean-reverting.

Choose bar_size to match your horizon, 30s/1m for scalps where you need the burst resolution, 5m/15m for a cleaner session-level pressure read.

Where It Fits in the 0DTE Stack

  • 0DTE snapshot, the live regime (net GEX/DEX, gamma flip, walls, pin) this hedging acts on. Start here for the state.
  • 0DTE series, the broader intraday time series of regime metrics; hedge-flow is the dealer-action layer beneath it.
  • Dealer risk, the settled-versus-live exposure shift that causes the hedge flow.

API Access and Pricing

The 0DTE hedge-flow endpoint is on the Growth plan and higher, alongside the rest of the live 0DTE flow surface.

PlanPrice0DTE hedge flowRate Limit
Free$0No5 req/day
Basicfrom $63/moNo100 req/day
Growthfrom $239/moYes2,500 req/day
Alphafrom $1,199/moYesUnlimited

Try the shape in the browser via the hedge-flow endpoint docs (live "Try It" widget) or the interactive API playground. SDKs cover Python, JavaScript, C#, Go, and Java.

Measure the squeeze, don't just feel it

Per-bar dealer hedge delta-dollars on today's 0DTE chain. Growth plan. Calls, puts, or both.

Get API Access

Frequently Asked Questions

Yes. GET /v1/flow/zero-dte/hedge-flow/{symbol} returns the estimated dealer hedge-flow time series for today's 0DTE chain, signed delta-dollars dealers are inferred to be buying or selling each bar to stay hedged, plus a running cumulative. A run of same-signed, accelerating bars with a same-signed price move is the squeeze signature. It is on the Growth plan.
bars[].bar is the signed delta-dollars dealers are inferred to transact in that bucket to stay hedged, positive is net buying, negative is net selling. bars[].cumulative is the running sum since session open for the requested side. Both are estimates from the FlashAlpha flow model, not a dealer's actual orders, so read them as a relative pressure signal.
Yes. The side parameter projects the flow to all (default), calls, or puts without re-scanning trades. Comparing the call and put cumulatives tells you whether pressure is upside call-chasing or downside protection-driven, a split the combined total can hide.
No, this endpoint is scoped to today's 0DTE expiry (the chain expiring today, ET), which is where same-day dealer hedging is most concentrated and most impactful. Outside a 0DTE session it returns a normal 200 with an empty bars array, so guard for that. For full-chain dealer exposure use the dealer-risk and GEX endpoints.
The 0DTE hedge-flow endpoint is on the Growth plan (from $239/mo, 2,500 req/day) and the Alpha plan (from $1,199/mo, unlimited). It is not available on Free or Basic. Calling it below Growth returns a 403 tier_restricted.

Live Market Pulse

Get tick-by-tick visibility into market shifts with full-chain analytics streaming in real time.

Intelligent Screening

Screen millions of option pairs per second using your custom EV rules, filters, and setups.

Execution-Ready

Instantly send structured orders to Interactive Brokers right from your scan results.

Join the Community

Discord

Engage in real time conversations with us!

Twitter / X

Follow us for real-time updates and insights!

GitHub

Explore our open-source SDK, examples, and analytics resources!