---
title: "Api V2 Signals Basic Gex-Gradient Get"
method: GET
path: "/api/v2/signals/basic/gex-gradient"
tags: ["Trade Signals (v2)"]
---

# Api V2 Signals Basic Gex-Gradient Get

`GET /api/v2/signals/basic/gex-gradient`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/v2/signals/basic/gex-gradient`
- Auth: HTTP bearer

Gamma asymmetry around spot — above- vs below-spot dealer gamma skew.

Answers: *is dealer gamma stacked above or below current price, and
how does that bias the next move?* Decomposes per-strike gamma
exposure into four zones (above / below spot, ATM, wings) and scores
the asymmetry, flipping sign and damping under long-gamma regimes.

- Heavy **above-spot** concentration + short gamma → any up-move
  unwinds → **bullish**. Below-spot mirror is **bearish**.
- Under **long-gamma** the same concentration acts as resistance
  instead of fuel, so the signal is inverted and damped.

**Logic highlights** (`src/signals/basic/gex_gradient.py`):
- Classify each strike in `gex_by_strike` by `(strike − spot) / spot`:
  above/below, plus ATM (`≤ ±1.5%`) and wing (`≥ ±4%`) tags.
- `asymmetry = (above_abs − below_abs) / (above_abs + below_abs)` ∈ `[-1, +1]`.
- `raw = asymmetry` if `net_gex < 0`, else `−asymmetry × 0.40`
  (`SIGNAL_GEX_GRADIENT_LONG_GAMMA_DAMPING`).
- `confidence = max(0.25, 1 − wing_fraction)` — wings pin, kill directional edge.
- `score = clip(raw × confidence, [-1, 1])`.
- **Abstains (score=0)** if total gamma `< SIGNAL_GEX_GRADIENT_MIN_GAMMA`
  (default 5e7 — thin-OI guard).

**Params:**
- `symbol` (default `SPY`). Returns 404 if no row exists yet.

**Returns:**
```json
{
  "underlying": "SPY", "timestamp": "...",
  "clamped_score": 0.38, "score": 38.0, "direction": "bullish",
  "weighted_score": 0.0, "weight": 0.0,
  "above_spot_gamma_abs": 72500000.0,
  "below_spot_gamma_abs": 31200000.0,
  "asymmetry": 0.3986,
  "wing_fraction": 0.21,
  "context_values": {
    "source": "gex_by_strike",
    "above_spot_gamma_abs": 72500000.0, "below_spot_gamma_abs": 31200000.0,
    "atm_gamma_abs": 45800000.0, "wing_gamma_abs": 21900000.0,
    "above_spot_gamma_signed": 54300000.0, "below_spot_gamma_signed": -18700000.0,
    "wing_fraction": 0.21, "asymmetry": 0.3986, "strike_count": 42
  },
  "score_history": [{"score": 22.0, "timestamp": "..."}, "...up to 90"]
}
```

- `score` / `clamped_score` — `[-100, +100]` / `[-1, +1]`.
- `above_spot_gamma_abs` / `below_spot_gamma_abs` — `|Σ gamma|` for each side; USD-scaled. `null` if `source="unavailable"`.
- `asymmetry` — `[-1, +1]`; pre-regime adjustment. Matches score sign under `net_gex < 0`, flipped under `net_gex > 0`.
- `wing_fraction` — `[0, 1]`; share of total `|gamma|` at wing strikes (`> ±4%` OTM).
  **Read `wing_window_reached` first.** When it is `false` the ingested chain never
  reached ±4% (production defaults reach ±1.3% on SPX to ±3.0% on SPY), so
  `wing_fraction` is `0` because the bucket was unmeasurable, not because the wings
  were empty — and the confidence damper below is inert.
- `wing_window_reached` / `max_strike_distance_pct` — whether the wing bucket was
  reachable at all, and how far the widest surveyed strike sat from spot.
- `context_values.atm_gamma_abs` / `wing_gamma_abs` — absolute gamma in each bucket.
- `context_values.above_spot_gamma_signed` / `below_spot_gamma_signed` — signed sums.
- `context_values.strike_count` — int; strikes surveyed. Thin data → widen thresholds.
- `context_values.source` — `"gex_by_strike"` | `"unavailable"`.

**Trader interpretation.**
- `score > +50` with `net_gex < 0` → classic short-gamma upside setup;
  dealers will chase. Favor calls.
- `score < −50` with `net_gex < 0` → short-gamma downside setup; dealers
  accelerate flush.
- **Strong score with `net_gex > 0`** → structural resistance in that
  direction; fade instead of follow.
- `wing_fraction > 0.5` → confidence already reduced by code; treat score
  as weak even if magnitude is high.
- `strike_count < 10` → sparse data; widen threshold.

**Page design.** Four-zone horizontal strike map centered on spot: above-
and below-spot buckets as mirrored bars, intensity by `|signed gamma|`.
Separate ATM / wing donut slices showing concentration share. `asymmetry`
gauge (−1 → +1). Regime chip (`net_gex > 0` vs `< 0`) since the same
asymmetry has opposite implications in each regime.

## Query parameters

- `symbol` string

## Response `200`

Successful Response

- EnvelopeAny
  - `data` unknown, required
  - `freshness` Freshness, required: The v2 freshness envelope. Present on every ``/api/v2/*`` response.
    - `evaluated_at` string, date-time, required: When the API evaluated this response (server wall clock, UTC). Endpoint-health signal: advances on every request even when the underlying data is unchanged.
    - `generated_at` string, date-time, required: When the served data was computed. Equals the snapshot stamp for cycle-backed endpoints, or evaluated_at for endpoints computed on demand for this request.
    - `source_timestamp` string, date-time, nullable: Timestamp of the upstream market observation the payload derives from. This is what freshness_status is measured against. Null when the endpoint has no upstream feed or returned no rows.
    - `latest_event_at` string, date-time, nullable: Newest event timestamp present in the payload (last bar, last trade, last scored row). Best-effort on very large responses, which are sampled rather than fully walked.
    - `age_seconds` number, nullable: evaluated_at - source_timestamp, in seconds. Null when source_timestamp is null.
    - `market_session_status` string, required: pre-market | regular | after-hours | closed (US/Eastern).
    - `expected_update_cadence` string, nullable: ISO-8601 duration for how often this endpoint's data is expected to change right now, e.g. PT60S. Null means no updates are expected (weekend, holiday, or a feed that only runs during the session).
    - `expected_update_cadence_seconds` number, nullable: expected_update_cadence as a number of seconds.
    - `cadence_profile` string, required: Identifier of the cadence class this endpoint belongs to, e.g. analytics_cycle. Stable across releases; the seconds behind it may be retuned.
    - `stale_after` string, date-time, nullable: Instant after which this payload should be treated as stale. Null whenever expected_update_cadence is null.
    - `freshness_status` 'fresh' | 'aging' | 'stale' | 'session_closed' | 'static' | 'unknown', required: The rolled-up freshness verdict for one response. ``fresh`` ``source_timestamp`` is within one expected update cadence. ``aging`` Past one cadence but not yet past ``stale_after`` — the grace band that absorbs normal cycle jitter. Not an error; a client that polls faster than the cadence sees this routinely. ``stale`` Past ``stale_after`` while updates *were* expected. This is the actionable state: the feed behind this endpoint is late. ``session_closed`` A feed-backed endpoint whose feed is not due to produce anything right now (weekend, holiday, or a feed that only runs during the session). The payload is the last good value — deliberately NOT reported as ``stale``, because an overnight consumer polling a closed market is not observing a fault and should not page on it. ``static`` The endpoint is not feed-backed at all: completed history, or a result computed from the caller's own inputs. Age here carries no health meaning and never becomes a fault. ``unknown`` No source timestamp could be resolved from the payload (e.g. a pure calculator, an admin endpoint, or an empty result set). A consumer should fall back to ``evaluated_at`` for endpoint health and make no claim about data age.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
