{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-xtrending-country-schema.json",
  "title": "XTrendingCountry",
  "description": "Trending country with aggregated buzz metrics from X/Twitter.",
  "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/XTrendingCountry",
  "properties": {
    "buzz_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Buzz Score",
      "description": "Aggregated Buzz Score (0-100) from X mentions"
    },
    "trend": {
      "type": "string",
      "enum": [
        "rising",
        "falling",
        "stable"
      ],
      "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",
      "title": "Mentions",
      "description": "Total tweet mentions"
    },
    "unique_tickers": {
      "type": "integer",
      "title": "Unique Tickers",
      "description": "Number of unique tickers mentioned"
    },
    "unique_authors": {
      "type": "integer",
      "title": "Unique Authors",
      "description": "Exact distinct author breadth across the selected UTC period"
    },
    "sentiment_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment Score",
      "description": "Weighted average sentiment (-1 bearish to +1 bullish)"
    },
    "bullish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bullish Pct",
      "description": "Percentage of bullish mentions"
    },
    "bearish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bearish Pct",
      "description": "Percentage of bearish mentions"
    },
    "total_upvotes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Total Upvotes",
      "description": "Total likes across all mentions"
    },
    "trend_history": {
      "items": {
        "type": "number"
      },
      "type": "array",
      "title": "Trend History",
      "description": "Daily dimension buzz scores (oldest to newest). Length follows the resolved period, with a minimum of 7 values. Every slot describes only its UTC calendar day. The live final value describes today so far and can differ from period buzz_score. Closed historical windows end at `to`. Historical author breadth is rebuilt from daily author_distribution where available and may conservatively approximate exact cross-ticker author de-duplication."
    },
    "top_tickers": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 5,
      "title": "Top Tickers",
      "description": "Top 5 tickers by mention count in this dimension"
    },
    "country": {
      "type": "string",
      "title": "Country",
      "description": "Country name"
    }
  },
  "type": "object",
  "required": [
    "buzz_score",
    "trend",
    "mentions",
    "unique_tickers",
    "unique_authors",
    "trend_history",
    "top_tickers",
    "country"
  ]
}