{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/backquant-com/json-schema/backquant-com-expiry-summary-response-schema.json",
  "title": "ExpirySummaryResponse",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/backquant-com-api-openapi.json#/components/schemas/ExpirySummaryResponse",
  "properties": {
    "success": {
      "type": "boolean",
      "const": true,
      "title": "Success",
      "default": true
    },
    "data": {
      "$ref": "#/$defs/ExpirySummaryData"
    },
    "meta": {
      "$ref": "#/$defs/V2Meta"
    }
  },
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "ExpiryRow": {
      "properties": {
        "expiry": {
          "type": "string",
          "title": "Expiry"
        },
        "dte": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Dte"
        },
        "atm_iv": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Atm Iv",
          "description": "ATM implied volatility in percent (33.0 = 33%)."
        },
        "skew_25d": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Skew 25D"
        },
        "put_25d_iv": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Put 25D Iv"
        },
        "call_25d_iv": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Call 25D Iv"
        },
        "pcr": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pcr"
        },
        "call_oi": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Call Oi"
        },
        "put_oi": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Put Oi"
        },
        "total_oi": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Oi"
        },
        "net_gex": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Net Gex"
        },
        "type": {
          "type": "string",
          "enum": [
            "daily",
            "weekly",
            "monthly",
            "quarterly",
            "unknown"
          ],
          "title": "Type"
        },
        "is_anchor": {
          "type": "boolean",
          "title": "Is Anchor"
        },
        "expiry_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expiry Date",
          "description": "ISO date when token parses cleanly."
        },
        "notional_oi_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Notional Oi Usd"
        },
        "max_pain": {
          "anyOf": [
            {
              "$ref": "#/$defs/GexMaxPainBlock"
            },
            {
              "type": "null"
            }
          ]
        },
        "by_venue": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/VenueOI"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "By Venue",
          "description": "Per-venue open interest for this expiry (all ten venues, zero-filled). Null only when no venue split is available."
        },
        "by_venue_unattributed": {
          "anyOf": [
            {
              "$ref": "#/$defs/VenueOI"
            },
            {
              "type": "null"
            }
          ],
          "description": "Open interest not attributable to a venue; null when the split reconciles with call_oi / put_oi."
        }
      },
      "type": "object",
      "required": [
        "expiry",
        "type",
        "is_anchor"
      ],
      "title": "ExpiryRow",
      "description": "Per-expiry row, enriched with OPEX classification + max-pain."
    },
    "ExpirySummaryData": {
      "properties": {
        "expiries": {
          "items": {
            "$ref": "#/$defs/ExpiryRow"
          },
          "type": "array",
          "title": "Expiries"
        },
        "anchor_count": {
          "type": "integer",
          "title": "Anchor Count"
        },
        "type_counts": {
          "$ref": "#/$defs/ExpirySummaryTypeCounts"
        }
      },
      "type": "object",
      "required": [
        "expiries",
        "anchor_count",
        "type_counts"
      ],
      "title": "ExpirySummaryData"
    },
    "ExpirySummaryTypeCounts": {
      "properties": {
        "daily": {
          "type": "integer",
          "title": "Daily",
          "default": 0
        },
        "weekly": {
          "type": "integer",
          "title": "Weekly",
          "default": 0
        },
        "monthly": {
          "type": "integer",
          "title": "Monthly",
          "default": 0
        },
        "quarterly": {
          "type": "integer",
          "title": "Quarterly",
          "default": 0
        }
      },
      "type": "object",
      "title": "ExpirySummaryTypeCounts"
    },
    "GexMaxPainBlock": {
      "properties": {
        "strike": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Strike"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "type": "object",
      "title": "GexMaxPainBlock"
    },
    "V2Meta": {
      "properties": {
        "version": {
          "type": "string",
          "const": "2.0",
          "title": "Version",
          "description": "API version tag."
        },
        "timestamp": {
          "type": "string",
          "title": "Timestamp",
          "description": "ISO 8601 wall-clock when the response was built."
        },
        "request_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Request Id",
          "description": "X-Request-ID for tracing across logs / Sentry."
        },
        "symbol": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Symbol",
          "description": "Symbol the response is about, if applicable."
        },
        "spot_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Spot Price",
          "description": "Current spot price for the symbol."
        },
        "computed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Computed At",
          "description": "ISO 8601 of when the underlying cache value was last written."
        },
        "freshness_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Freshness Seconds",
          "description": "`now - computed_at` in seconds; useful for staleness alarms."
        },
        "source": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "Upstream venue list the data flowed through."
        },
        "exchanges_filtered": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exchanges Filtered",
          "description": "Echo of the `?exchanges=` filter when one was applied."
        },
        "rate_limit": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rate Limit",
          "description": "`{limit, remaining, reset}` echo of the rate-limit headers."
        },
        "extra": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Extra",
          "description": "Open dict for endpoint-specific metadata (filter_hash, etc.)."
        }
      },
      "type": "object",
      "required": [
        "version",
        "timestamp"
      ],
      "title": "V2Meta",
      "description": "The meta block returned alongside every v2 response.\n\nEvery field after `version`/`timestamp` is optional because endpoints\nattach different combinations - e.g. `/v2/status` skips `symbol`, the\nchain endpoint sets `extra.filter_hash`, etc. Listing them here means\nSDKs get a typed accessor for each instead of a generic `meta: dict`."
    },
    "VenueOI": {
      "properties": {
        "call_oi": {
          "type": "number",
          "title": "Call Oi",
          "description": "Call open interest, coin units."
        },
        "put_oi": {
          "type": "number",
          "title": "Put Oi",
          "description": "Put open interest, coin units."
        },
        "total_oi": {
          "type": "number",
          "title": "Total Oi",
          "description": "call_oi + put_oi, coin units."
        },
        "notional_oi_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Notional Oi Usd",
          "description": "total_oi x spot, using the same spot the response reports."
        }
      },
      "type": "object",
      "required": [
        "call_oi",
        "put_oi",
        "total_oi"
      ],
      "title": "VenueOI",
      "description": "One venue's open interest on a surface. OI is coin-native on every\nvenue, so cross-venue sums need no conversion."
    }
  }
}