{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/skylit-ai/json-schema/skylit-ai-levels-summary-schema.json",
  "title": "LevelsSummary",
  "description": "Digest of the returned strikes for the selected `metric`. Covers only\nthe strikes between `lowStrike` and `highStrike` (set by `maxStrikes`,\n`maxExpirations` and `expirations`), never the whole chain.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/skylit-ai-openapi.yml#/components/schemas/LevelsSummary",
  "type": "object",
  "required": [
    "netExposure",
    "positiveWall",
    "negativeWall",
    "flip",
    "lowStrike",
    "highStrike"
  ],
  "properties": {
    "netExposure": {
      "type": "number",
      "description": "Sum of `value` over the returned strikes."
    },
    "positiveWall": {
      "description": "The strike with the largest positive value, or null when none is positive.",
      "nullable": true,
      "anyOf": [
        {
          "$ref": "#/$defs/Level"
        },
        {
          "enum": [
            null
          ]
        }
      ]
    },
    "negativeWall": {
      "description": "The strike with the most negative value, or null when none is negative.",
      "nullable": true,
      "anyOf": [
        {
          "$ref": "#/$defs/Level"
        },
        {
          "enum": [
            null
          ]
        }
      ]
    },
    "flip": {
      "description": "Where the running sum of `value`, from the lowest returned strike\nupward, changes sign (linear interpolation between the bracketing\nstrikes; the crossing nearest spot when there are several). Null\nwhen the running sum never changes sign within the window.\n",
      "nullable": true,
      "anyOf": [
        {
          "type": "object",
          "required": [
            "level",
            "distancePct"
          ],
          "properties": {
            "level": {
              "type": "number"
            },
            "distancePct": {
              "type": "number",
              "description": "Percent distance from spot (negative = below)."
            }
          }
        },
        {
          "enum": [
            null
          ]
        }
      ]
    },
    "lowStrike": {
      "type": "number",
      "description": "Lowest returned strike."
    },
    "highStrike": {
      "type": "number",
      "description": "Highest returned strike."
    }
  },
  "$defs": {
    "Level": {
      "type": "object",
      "required": [
        "strike",
        "value",
        "nodeType",
        "distancePct"
      ],
      "properties": {
        "strike": {
          "type": "number"
        },
        "value": {
          "type": "number",
          "description": "Net exposure at this strike for the selected metric."
        },
        "nodeType": {
          "type": "string",
          "enum": [
            "king",
            "gatekeeper",
            "pika",
            "barney",
            "significant"
          ]
        },
        "distancePct": {
          "type": "number",
          "description": "Percent distance from spot (negative = below)."
        }
      }
    }
  }
}