{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stockmarketscan-com/json-schema/stockmarketscan-com-options-flow-record-schema.json",
  "title": "OptionsFlowRecord",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stockmarketscan-com-openapi.json#/components/schemas/OptionsFlowRecord",
  "type": "object",
  "required": [
    "symbol",
    "signal_date",
    "signal_type",
    "side",
    "call_put_ratio",
    "call_put_oi_ratio",
    "near_earnings",
    "next_earnings_date",
    "call_volume",
    "put_volume",
    "total_volume",
    "total_oi",
    "call_avg_iv",
    "put_avg_iv",
    "total_premium",
    "consecutive_days",
    "signal_price",
    "entry_price",
    "entry_date",
    "net_delta",
    "avg_days_to_expiry",
    "strength_score",
    "bullish_screener_hits",
    "bearish_screener_hits",
    "bullish_screener_list",
    "bearish_screener_list",
    "market_breadth_score",
    "market_call_put_ratio",
    "market_context",
    "current_price",
    "high_since",
    "low_since",
    "price_change_pct",
    "max_gain_pct",
    "max_drawdown_pct",
    "max_high_date",
    "min_low_date"
  ],
  "additionalProperties": false,
  "properties": {
    "symbol": {
      "type": "string"
    },
    "signal_date": {
      "type": "string",
      "format": "date",
      "description": "Trading day of the record."
    },
    "signal_type": {
      "type": "string",
      "description": "Classification of the day's flow by call/put ratio, streak, and volume.",
      "enum": [
        "strong_bullish",
        "strong_bearish",
        "accumulation",
        "distribution",
        "high_vol_bullish",
        "high_vol_bearish",
        "bullish",
        "bearish"
      ]
    },
    "side": {
      "type": "string",
      "enum": [
        "bullish",
        "bearish"
      ],
      "description": "`bullish` when the call/put volume ratio is above 1."
    },
    "call_put_ratio": {
      "type": [
        "number",
        "null"
      ],
      "description": "Call/put volume ratio."
    },
    "call_put_oi_ratio": {
      "type": [
        "number",
        "null"
      ],
      "description": "Call/put open-interest ratio."
    },
    "near_earnings": {
      "type": "boolean",
      "description": "An earnings report falls within 14 days after the record date."
    },
    "next_earnings_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "call_volume": {
      "type": "integer"
    },
    "put_volume": {
      "type": "integer"
    },
    "total_volume": {
      "type": "integer"
    },
    "total_oi": {
      "type": "integer"
    },
    "call_avg_iv": {
      "type": [
        "number",
        "null"
      ],
      "description": "Average implied volatility of calls, in percent."
    },
    "put_avg_iv": {
      "type": [
        "number",
        "null"
      ]
    },
    "total_premium": {
      "type": [
        "number",
        "null"
      ],
      "description": "Call plus put premium, USD."
    },
    "consecutive_days": {
      "type": "integer",
      "description": "Streak length of the same flow regime up to the record date."
    },
    "signal_price": {
      "type": [
        "number",
        "null"
      ],
      "description": "Underlying price on the record date."
    },
    "entry_price": {
      "type": [
        "number",
        "null"
      ],
      "description": "Open of the first daily candle after the record was published. Null until that candle exists."
    },
    "entry_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "net_delta": {
      "type": [
        "number",
        "null"
      ]
    },
    "avg_days_to_expiry": {
      "type": [
        "number",
        "null"
      ]
    },
    "strength_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 13,
      "description": "Composite ranking score."
    },
    "bullish_screener_hits": {
      "type": "integer"
    },
    "bearish_screener_hits": {
      "type": "integer"
    },
    "bullish_screener_list": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "bearish_screener_list": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "market_breadth_score": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 100
    },
    "market_call_put_ratio": {
      "type": [
        "number",
        "null"
      ]
    },
    "market_context": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "bullish_only",
        "bearish_only",
        "mixed",
        null
      ]
    },
    "current_price": {
      "type": [
        "number",
        "null"
      ],
      "description": "Latest daily close."
    },
    "high_since": {
      "type": [
        "number",
        "null"
      ],
      "description": "Highest high since entry_date."
    },
    "low_since": {
      "type": [
        "number",
        "null"
      ],
      "description": "Lowest low since entry_date."
    },
    "price_change_pct": {
      "type": [
        "number",
        "null"
      ],
      "description": "(current_price - entry_price) / entry_price * 100."
    },
    "max_gain_pct": {
      "type": [
        "number",
        "null"
      ],
      "description": "(high_since - entry_price) / entry_price * 100."
    },
    "max_drawdown_pct": {
      "type": [
        "number",
        "null"
      ],
      "description": "(low_since - entry_price) / entry_price * 100."
    },
    "max_high_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "min_low_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    }
  }
}