{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-polymarket-stock-detail-response-schema.json",
  "title": "PolymarketStockDetailResponse",
  "description": "Detailed Polymarket data for a single stock.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-polymarket-stocks-api-openapi.yml#/components/schemas/PolymarketStockDetailResponse",
  "properties": {
    "ticker": {
      "type": "string",
      "title": "Ticker",
      "description": "Stock ticker symbol"
    },
    "company_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Name",
      "description": "Company name from ticker_reference"
    },
    "found": {
      "type": "boolean",
      "title": "Found",
      "description": "Legacy v1 data-availability flag. `true` means this service has qualifying data for this asset/window. `false` means the asset is supported, but this service has no qualifying data for the requested window. Planned for removal in v2.",
      "deprecated": true
    },
    "buzz_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Buzz Score",
      "description": "Buzz score (0-100)"
    },
    "trend": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "rising",
            "falling",
            "stable"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Trend",
      "description": "Flow momentum over the current 3 UTC days vs previous 3 UTC days using trades, volume, market breadth and liquidity; not price movement. For `from`/`to`, anchors at `to` (or now when `to` is today)."
    },
    "period_days": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 365.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Period Days",
      "description": "Analysis period in days"
    },
    "trade_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Trade Count",
      "description": "Trade count in period"
    },
    "market_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Market Count",
      "description": "Distinct markets that existed for ticker within the selected UTC window, counted by market-catalog lifetime overlap"
    },
    "current_market_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Current Market Count",
      "description": "Number of currently open markets in the latest UTC-day snapshot for ticker; use this for live-only market breadth"
    },
    "unique_traders": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Unique Traders",
      "description": "Exact distinct union of observed proxy and explicit maker wallet hashes for the delivered scope and UTC window; null when retained wallet-level trades do not fully cover the window; not a complete market-wide participant census"
    },
    "sentiment_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment Score",
      "description": "Orderbook-aware implied sentiment; null when no directional sentiment evidence exists in the selected period"
    },
    "positive_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Positive Count",
      "description": "Deprecated. Outcome-aware bullish market count retained for v1 compatibility; prefer bullish_pct with trade_count and market_count for public analysis.",
      "deprecated": true
    },
    "negative_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Negative Count",
      "description": "Deprecated. Outcome-aware bearish market count retained for v1 compatibility; prefer bearish_pct with trade_count and market_count for public analysis.",
      "deprecated": true
    },
    "neutral_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Neutral Count",
      "description": "Deprecated. Outcome-aware neutral/unclassified market count retained for v1 compatibility; prefer bullish_pct, bearish_pct, trade_count and market_count for public analysis.",
      "deprecated": true
    },
    "bullish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bullish Pct",
      "description": "Outcome-aware bullish market percentage"
    },
    "bearish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bearish Pct",
      "description": "Outcome-aware bearish market percentage"
    },
    "total_liquidity": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Total Liquidity",
      "description": "Windowed aggregated liquidity signal in USD over the selected period; not a current snapshot"
    },
    "daily_trend": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PolymarketDailyTrendItem"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Daily Trend",
      "description": "Daily activity breakdown for the selected period"
    },
    "top_mentions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PolymarketTopMention"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top Mentions",
      "description": "Top markets with an active/open snapshot during the retained snapshot portion of the selected UTC-day period for this ticker (including the current UTC day so far), capped at 10 and sorted as representative sentiment evidence: outcome-aware directional markets first, opposing signals kept visible when present, then trade count, with non-open markets de-prioritized and 24h volume and liquidity as tie-breakers. For windows longer than raw snapshot retention, ticker analytics still use `polymarket_daily_stats`, but this representative snapshot list is limited to retained `polymarket_market_snapshots`. Item prices and liquidity come from the selected in-period snapshot, not necessarily the current market state. `active` indicates whether the market is currently open, so historical in-period evidence can now have a non-open current state. `market_status` gives the compact current state."
    },
    "pulse": {
      "anyOf": [
        {
          "$ref": "#/$defs/PolymarketTickerPulse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Compact current Polymarket interpretation built from locally stored latest snapshot evidence. Does not duplicate top-level aggregate fields; concrete market evidence remains in `top_mentions`."
    }
  },
  "type": "object",
  "required": [
    "ticker",
    "found"
  ],
  "$defs": {
    "PolymarketDailyTrendItem": {
      "properties": {
        "date": {
          "type": "string",
          "title": "Date",
          "description": "Date in YYYY-MM-DD format"
        },
        "trade_count": {
          "type": "integer",
          "title": "Trade Count",
          "description": "Trade count on this date"
        },
        "sentiment_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment Score",
          "description": "Outcome-aware implied sentiment on this date; can come from orderbook evidence or legacy traded price evidence, null when no sentiment evidence exists"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Buzz score on this date; null when neither a daily aggregate nor a live fallback could be computed for this date"
        },
        "bullish_pct": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Bullish Pct",
          "description": "Outcome-aware bullish market-direction percentage for this date"
        },
        "bearish_pct": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Bearish Pct",
          "description": "Outcome-aware bearish market-direction percentage for this date"
        }
      },
      "type": "object",
      "required": [
        "date",
        "trade_count"
      ],
      "title": "PolymarketDailyTrendItem",
      "description": "Daily trend item for stock detail endpoint."
    },
    "PolymarketPulseEvidence": {
      "properties": {
        "directional_coverage": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Directional Coverage",
          "description": "Share of current open snapshot markets with outcome-aware directional evidence"
        },
        "traded_market_pct": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Traded Market Pct",
          "description": "Share of current open snapshot markets with trades in the latest UTC day"
        },
        "zero_trade_market_pct": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Zero Trade Market Pct",
          "description": "Share of current open snapshot markets without trades in the latest UTC day"
        },
        "avg_spread": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Avg Spread",
          "description": "Average YES-token spread across current open snapshot markets with bid/ask spread evidence"
        },
        "snapshot_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Snapshot At",
          "description": "Latest stored snapshot timestamp used by the pulse read model"
        }
      },
      "type": "object",
      "title": "PolymarketPulseEvidence",
      "description": "Compact data-quality evidence for the ticker-level Polymarket pulse."
    },
    "PolymarketTickerPulse": {
      "properties": {
        "mood": {
          "type": "string",
          "enum": [
            "bullish",
            "bearish",
            "mixed",
            "event_driven",
            "illiquid",
            "unclear"
          ],
          "title": "Mood",
          "description": "Current compact Polymarket interpretation for this ticker"
        },
        "confidence": {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Confidence",
          "description": "Interpretation confidence capped by coverage, trade breadth, spread, liquidity and recency"
        },
        "thin_data": {
          "type": "boolean",
          "title": "Thin Data",
          "description": "True when current evidence is insufficient for a strong directional interpretation"
        },
        "why": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 4,
          "minItems": 1,
          "title": "Why",
          "description": "Stable machine-readable reason codes explaining the pulse interpretation"
        },
        "warnings": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Warnings",
          "description": "Stable machine-readable data quality, freshness and tradability warnings"
        },
        "evidence": {
          "$ref": "#/$defs/PolymarketPulseEvidence",
          "description": "Compact non-duplicative quality summary for the pulse inputs"
        }
      },
      "type": "object",
      "required": [
        "mood",
        "confidence",
        "thin_data",
        "why",
        "evidence"
      ],
      "title": "PolymarketTickerPulse",
      "description": "Compact interpretation layer for current ticker-level Polymarket data."
    },
    "PolymarketTopMention": {
      "properties": {
        "condition_id": {
          "type": "string",
          "title": "Condition Id",
          "description": "Polymarket condition ID"
        },
        "question": {
          "type": "string",
          "title": "Question",
          "description": "Market question/title"
        },
        "market_type": {
          "type": "string",
          "title": "Market Type",
          "description": "Derived market type"
        },
        "trade_count": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Trade Count",
          "description": "UTC-day trade count from the selected in-period snapshot"
        },
        "sentiment_score": {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0,
          "title": "Sentiment Score",
          "description": "Outcome-aware market price sentiment for the selected in-period snapshot; prefers orderbook midpoint when available, falls back to YES/NO price and returns neutral 0.0 when direction is unclassified"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Market-level activity buzz score for this selected in-period snapshot"
        },
        "yes_price": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Yes Price",
          "description": "YES price from the selected in-period snapshot; not necessarily live"
        },
        "no_price": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "No Price",
          "description": "NO price from the selected in-period snapshot; not necessarily live"
        },
        "liquidity": {
          "type": "number",
          "minimum": 0.0,
          "title": "Liquidity",
          "description": "Selected in-period snapshot liquidity in USD; not necessarily live"
        },
        "volume_24h": {
          "type": "number",
          "minimum": 0.0,
          "title": "Volume 24H",
          "description": "Selected in-period snapshot rolling 24h volume in USD; not necessarily live"
        },
        "end_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "End Date",
          "description": "Market end date (ISO)"
        },
        "active": {
          "type": "boolean",
          "title": "Active",
          "description": "Whether the representative market state is open; snapshot-backed rows use current state, historical daily examples use stored representative state"
        },
        "market_status": {
          "type": "string",
          "enum": [
            "tradable",
            "open",
            "resolved",
            "inactive",
            "expired"
          ],
          "title": "Market Status",
          "description": "Compact market status for this representative item; snapshot-backed rows use current state, historical daily examples use stored representative state"
        }
      },
      "type": "object",
      "required": [
        "condition_id",
        "question",
        "market_type",
        "sentiment_score",
        "liquidity",
        "volume_24h",
        "active",
        "market_status"
      ],
      "title": "PolymarketTopMention",
      "description": "Top Polymarket market for a ticker with current open/closed state."
    }
  }
}