{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-xmarket-sentiment-response-schema.json",
  "title": "XMarketSentimentResponse",
  "description": "Service-level X/Twitter market sentiment across all tracked stocks.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-x-twitter-stocks-api-openapi.yml#/components/schemas/XMarketSentimentResponse",
  "properties": {
    "buzz_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Buzz Score",
      "description": "Service-wide X/Twitter heat score relative to the service's trailing 90-day baseline. Around 50 = normal activity, higher values = hotter-than-usual X activity."
    },
    "trend": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "rising",
            "falling",
            "stable"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Trend",
      "description": "Activity momentum over the current 3 UTC days vs previous 3 UTC days using mentions, likes and author breadth; not price movement or Grok rank movement. For `from`/`to`, anchors at `to` (or now when `to` is today)."
    },
    "mentions": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Mentions",
      "description": "Tweet mentions across the selected period"
    },
    "unique_tweets": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Unique Tweets",
      "description": "Exact distinct tweet count across the selected UTC period"
    },
    "unique_authors": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Unique Authors",
      "description": "Exact distinct author breadth across the selected UTC period"
    },
    "total_upvotes": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Total Upvotes",
      "description": "Total likes across the selected period"
    },
    "active_tickers": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Active Tickers",
      "description": "Number of tickers with X activity in the selected period"
    },
    "sentiment_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment Score",
      "description": "Service-wide average tweet sentiment score"
    },
    "positive_count": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Positive Count",
      "description": "Deprecated. Prefer bullish_pct with mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "negative_count": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Negative Count",
      "description": "Deprecated. Prefer bearish_pct with mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "neutral_count": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Neutral Count",
      "description": "Deprecated. Prefer bullish_pct, bearish_pct and mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "bullish_pct": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 0.0,
      "title": "Bullish Pct",
      "description": "Bullish tweet percentage"
    },
    "bearish_pct": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 0.0,
      "title": "Bearish Pct",
      "description": "Bearish tweet percentage"
    },
    "trend_history": {
      "items": {
        "type": "number"
      },
      "type": "array",
      "title": "Trend History",
      "description": "Daily service-wide buzz scores (oldest→newest) using the same relative baseline calibration. Length = max(requested_days, 7) for successful requests; windows before platform availability return HTTP 422."
    },
    "drivers": {
      "items": {
        "$ref": "#/$defs/XMarketSentimentDriver"
      },
      "type": "array",
      "title": "Drivers",
      "description": "Top assets by current buzz_score driving the service-level reading"
    }
  },
  "type": "object",
  "required": [
    "buzz_score",
    "mentions",
    "unique_tweets",
    "unique_authors",
    "total_upvotes",
    "active_tickers",
    "positive_count",
    "negative_count",
    "neutral_count",
    "bullish_pct",
    "bearish_pct"
  ],
  "$defs": {
    "XMarketSentimentDriver": {
      "properties": {
        "ticker": {
          "type": "string",
          "title": "Ticker",
          "description": "Stock ticker symbol"
        },
        "mentions": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Mentions",
          "description": "Tweet mentions in the selected period"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Asset buzz score in the selected period"
        },
        "sentiment_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment Score",
          "description": "Average tweet sentiment score for this asset"
        }
      },
      "type": "object",
      "required": [
        "ticker",
        "mentions",
        "buzz_score"
      ],
      "title": "XMarketSentimentDriver",
      "description": "Top asset contributing to the service-level X market sentiment."
    }
  }
}