{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dripmetrics-ai/json-schema/dripmetrics-ai-market-summary-result-schema.json",
  "title": "MarketSummaryResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dripmetrics-ai-market-summary-api-openapi.yml#/components/schemas/MarketSummaryResult",
  "type": "object",
  "properties": {
    "pair": {
      "type": "string",
      "const": "BTC"
    },
    "window": {
      "type": "string",
      "enum": [
        "30m",
        "1h",
        "2h",
        "3h"
      ]
    },
    "asOf": {
      "type": "string",
      "format": "date-time"
    },
    "lastPrice": {
      "type": [
        "number",
        "null"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "signals": {
      "type": "object",
      "description": "Deterministic categorical reads of each metric family. Each value is null when the underlying metric could not be computed.",
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "metrics": {
      "type": "object",
      "description": "The numeric metric values behind the signals.",
      "additionalProperties": {
        "type": [
          "number",
          "null"
        ]
      }
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "description": "AI-written explanation of the signals. Null only when generation failed after payment; the deterministic payload is still returned."
    },
    "summaryModel": {
      "type": [
        "string",
        "null"
      ]
    },
    "summaryError": {
      "type": "string"
    },
    "disclaimer": {
      "type": "string",
      "description": "Fixed informational-use disclaimer; never LLM-generated."
    },
    "sampleSize": {
      "type": "object",
      "additionalProperties": true
    },
    "coverage": {
      "type": "object",
      "additionalProperties": true
    },
    "source": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "pair",
    "window",
    "asOf",
    "lastPrice",
    "confidence",
    "signals",
    "metrics",
    "summary",
    "summaryModel",
    "disclaimer",
    "sampleSize",
    "coverage",
    "source"
  ],
  "additionalProperties": true
}