> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gammaflip.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GEX by Strike (Enhanced)

> GEX data by strike price with key markers (gamma flip, max pain, walls) and aggregate totals

## What it returns

For a specific expiration, this endpoint returns:

* **GEX per strike** — call, put, net, and total dealer gamma exposure at each listed strike
* **Key markers** — gamma flip point, max pain, largest positive/negative GEX strikes (walls),
  max-volatility and max-stability price levels, spot reference, and aggregate totals
* **Asymmetry metrics** — upside vs. downside GEX imbalance and bias direction
* **Metadata** — current price, strike range, timestamp, exchange/coin/expiration

This is the most detailed GEX endpoint — it's what powers the "GEX by Strike"
chart on [gammaflip.io](https://gammaflip.io).

## Path parameters

<ParamField path="exchange" type="string" required>
  Exchange name: `bybit`, `deribit`, `okx`, or `all`.
</ParamField>

<ParamField path="coin" type="string" required>
  Base coin symbol (uppercase).
</ParamField>

<ParamField path="expiration" type="string" required>
  Expiration date in `DDMMMYY` format (e.g., `25APR26`), or `TOTAL` to combine
  all expirations into a single view.
</ParamField>

## Response shape

```json theme={null}
{
  "data": {
    "gex_data": {
      "strikes":   [64000, 65000, 66000, ...],
      "call_gex":  [0, 0, 0, ...],
      "put_gex":   [0, 0, 0, ...],
      "net_gex":   [0, 0, 0, ...],
      "total_gex": [0, 0, 0, ...]
    },
    "markers": {
      "flip_points":   [{ "label": "F", "strike": 74359.02, "value": 0, "source": "gamma_profile" }],
      "max_pain":      { "label": "MP", "strike": 73500, "value": 5009961.93 },
      "absolute_max":  [{ "label": "A1", "strike": 73500, "value": 5009961.93 }, ...],
      "positive_max":  [{ "label": "P1", "strike": 75000, "value": 2438676.77 }, ...],
      "negative_max":  [{ "label": "N1", "strike": 73500, "value": -4385894.65 }, ...],
      "spot":          { "strike": 74032.81, "value": 0 },
      "stability_point":  { "label": "Max Stability",  "price": 76000, "gex": 9738048.19 },
      "volatility_point": { "label": "Max Volatility", "price": 73000, "gex": -6025085.01 },
      "totals": {
        "call_gex": 10647784.38,
        "put_gex": 13321643.60,
        "net_gex": -2673859.22,
        "absolute_gex": 23969427.97,
        "absolute_gex_power": 0.444
      },
      "asymmetry": {
        "upside_gex": 8354828.92,
        "downside_gex": 15614599.06,
        "asymmetry_ratio": -0.303,
        "bias": "bullish",
        "upside_distance": 1075.95,
        "downside_distance": 872.48
      }
    },
    "metadata": {
      "basecoin": "BTC",
      "exchange": "deribit",
      "expiration_date": "15APR26",
      "current_price": 74032.81,
      "data_points": 26,
      "strike_range": { "min": 64000, "max": 82000 },
      "enhanced": true,
      "gamma_profile_source": true,
      "timestamp": "2026-04-14T22:42:25.330317Z",
      "timestamp_ms": 1776202945330
    }
  }
}
```

### Field guide

* **`gex_data`** — parallel arrays; index `i` across all arrays refers to the same strike.
  `total_gex` = `call_gex - put_gex` aggregated on dealers' side.
* **`flip_points`** — price level(s) where net dealer GEX crosses zero. Above the flip,
  dealer hedging is positive-gamma (stabilising); below, it's negative-gamma (amplifying).
* **`absolute_max` / `positive_max` / `negative_max`** — ranked lists of the largest absolute,
  positive, and negative GEX strikes. These are the "walls" where hedging flows concentrate.
* **`stability_point`** — strike with the highest positive net GEX (strongest pinning effect).
* **`volatility_point`** — strike with the most negative net GEX (biggest move-amplifier).
* **`asymmetry`** — imbalance between upside and downside dealer exposure; `bias` is
  a qualitative read (`bullish` / `bearish` / `neutral`).

<Info>
  `TOTAL` aggregates all expirations for the given coin. Useful for getting an
  "all-positioning" view; individual expiration views are more precise for
  timing-specific trades.
</Info>

## Errors

<ResponseField name="400 invalid_exchange" type="error">
  Exchange not recognized.
</ResponseField>

<ResponseField name="404 no_data" type="error">
  No data for this coin/exchange/expiration combination. Common cause: the
  expiration doesn't exist on that exchange (use `/expirations/` first).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.gammaflip.io/api/v1/gex/by-strike-enhanced/all/BTC/25APR26" \
    -H "X-API-Key: gex_sk_your_key_here"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://api.gammaflip.io/api/v1/gex/by-strike-enhanced/all/BTC/25APR26",
      headers={"X-API-Key": "gex_sk_your_key_here"},
  )
  data = resp.json()["data"]

  markers = data["markers"]
  meta = data["metadata"]

  print(f"Spot:          {meta['current_price']:,.2f}")
  if markers["flip_points"]:
      print(f"Gamma flip:    {markers['flip_points'][0]['strike']:,.2f}")
  print(f"Max volatility:{markers['volatility_point']['price']:,.2f}")
  print(f"Max stability: {markers['stability_point']['price']:,.2f}")
  print(f"Net GEX:       {markers['totals']['net_gex']:+,.0f}")
  print(f"Bias:          {markers['asymmetry']['bias']}")

  # Top 5 strikes by absolute GEX
  gex = data["gex_data"]
  rows = sorted(
      zip(gex["strikes"], gex["net_gex"]),
      key=lambda r: abs(r[1]),
      reverse=True,
  )
  for strike, net in rows[:5]:
      print(f"Strike {strike:>8,.0f}: net GEX = {net:+,.0f}")
  ```

  ```javascript Node.js theme={null}
  const url = "https://api.gammaflip.io/api/v1/gex/by-strike-enhanced/all/BTC/25APR26";
  const resp = await fetch(url, {
    headers: { "X-API-Key": "gex_sk_your_key_here" },
  });
  const { data } = await resp.json();

  console.log("Spot:", data.metadata.current_price);
  console.log("Flip:", data.markers.flip_points[0]?.strike);
  console.log("Totals:", data.markers.totals);
  console.log("Strikes returned:", data.gex_data.strikes.length);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "gex_data": {
        "strikes":   [70000, 72000],
        "call_gex":  [4000000, 50000000],
        "put_gex":   [16500000, 5000000],
        "net_gex":   [-12500000, 45000000],
        "total_gex": [-12500000, 45000000]
      },
      "markers": {
        "flip_points": [{ "label": "F", "strike": 71500, "value": 0, "source": "gamma_profile" }],
        "max_pain":    { "label": "MP", "strike": 72000, "value": 50000000 },
        "totals": { "net_gex": 32500000, "call_gex": 54000000, "put_gex": 21500000, "absolute_gex": 75500000, "absolute_gex_power": 0.7 }
      },
      "metadata": {
        "basecoin": "BTC",
        "exchange": "all",
        "expiration_date": "25APR26",
        "current_price": 71800,
        "timestamp": "2026-04-14T10:00:00Z"
      }
    },
    "meta": {
      "timestamp": "2026-04-14T10:00:00+00:00",
      "exchange": "all",
      "coin": "BTC",
      "expiration": "25APR26",
      "rate_limit": {
        "limit": 500,
        "remaining": 492,
        "reset": "2026-04-15T00:00:00+00:00"
      }
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "no_data",
    "message": "No data available for BTC."
  }
  ```
</ResponseExample>
