{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stockmarketscan-com/json-schema/stockmarketscan-com-sentiment-day-schema.json",
  "title": "SentimentDay",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stockmarketscan-com-openapi.json#/components/schemas/SentimentDay",
  "type": "object",
  "required": [
    "date",
    "market_breadth_score",
    "market_call_put_ratio",
    "context",
    "bullish_count",
    "bearish_count",
    "sentiment_score",
    "sentiment_label"
  ],
  "additionalProperties": false,
  "properties": {
    "date": {
      "type": "string",
      "format": "date"
    },
    "market_breadth_score": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Combined advance/decline and new-highs/new-lows score, 0 to 100."
    },
    "market_call_put_ratio": {
      "type": [
        "number",
        "null"
      ],
      "description": "Market-wide call volume divided by put volume."
    },
    "context": {
      "type": "string",
      "enum": [
        "bullish_only",
        "bearish_only",
        "mixed"
      ]
    },
    "bullish_count": {
      "type": "integer"
    },
    "bearish_count": {
      "type": "integer"
    },
    "sentiment_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "clamp(round((market_call_put_ratio - 0.5) * 100), 0, 100); 50 when the ratio is missing."
    },
    "sentiment_label": {
      "type": "string",
      "enum": [
        "bullish",
        "neutral",
        "bearish"
      ],
      "description": "65 and above bullish, 45 to 64 neutral, below 45 bearish."
    }
  }
}