{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gammaflip-io/json-schema/gammaflip-io-levels-schema.json",
  "title": "Levels",
  "description": "The levels of one GEX snapshot. GEX values are USD per 1% move of the\nunderlying; `call_gex` and `put_gex` are non-negative, `net_gex = call_gex - put_gex`.\nMissing values are `null`. See the data dictionary.\n",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gammaflip-io-openapi.yml#/components/schemas/Levels",
  "type": "object",
  "properties": {
    "spot": {
      "type": [
        "number",
        "null"
      ],
      "description": "Underlying price at capture."
    },
    "flip": {
      "type": [
        "number",
        "null"
      ],
      "description": "Primary gamma-flip price (`flip_points[0]`), the net-gamma sign change nearest to spot."
    },
    "flip_count": {
      "type": "integer",
      "description": "Number of zero crossings in the profile."
    },
    "regime": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "positive",
        "negative",
        null
      ],
      "description": "`positive` if `spot >= flip`."
    },
    "net_gex": {
      "type": [
        "number",
        "null"
      ],
      "description": "Sum of call_gex minus sum of put_gex."
    },
    "abs_gex": {
      "type": [
        "number",
        "null"
      ],
      "description": "Sum of call_gex plus sum of put_gex."
    },
    "call_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "put_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "call_oi_total": {
      "type": [
        "number",
        "null"
      ],
      "description": "Sum of call open interest in contracts."
    },
    "put_oi_total": {
      "type": [
        "number",
        "null"
      ],
      "description": "Sum of put open interest in contracts."
    },
    "p1_strike": {
      "type": [
        "number",
        "null"
      ],
      "description": "Strike with the largest positive net GEX."
    },
    "p1_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "p2_strike": {
      "type": [
        "number",
        "null"
      ]
    },
    "p2_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "n1_strike": {
      "type": [
        "number",
        "null"
      ],
      "description": "Strike with the most negative net GEX."
    },
    "n1_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "n2_strike": {
      "type": [
        "number",
        "null"
      ]
    },
    "n2_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "a1_strike": {
      "type": [
        "number",
        "null"
      ],
      "description": "Strike with the largest absolute GEX (call + put)."
    },
    "a1_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "a2_strike": {
      "type": [
        "number",
        "null"
      ]
    },
    "a2_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "s_price": {
      "type": [
        "number",
        "null"
      ],
      "description": "Max-stability level, the peak of the net-gamma profile (a price)."
    },
    "s_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "v_price": {
      "type": [
        "number",
        "null"
      ],
      "description": "Max-volatility level, the trough of the net-gamma profile (a price)."
    },
    "v_gex": {
      "type": [
        "number",
        "null"
      ]
    },
    "max_pain": {
      "type": [
        "number",
        "null"
      ],
      "description": "Per-expiration max-pain strike; `null` for TOTAL."
    },
    "atm_iv": {
      "type": [
        "number",
        "null"
      ],
      "description": "ATM implied volatility as a decimal (0.18 = 18%)."
    }
  }
}