{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thecoindaily-co/json-schema/thecoindaily-co-explorer-analysis-schema.json",
  "title": "ExplorerAnalysis",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/research-openapi.json#/components/schemas/ExplorerAnalysis",
  "properties": {
    "snapshot_id": {
      "type": "string",
      "pattern": "^cohort-history:[a-f0-9]{64}$",
      "title": "Snapshot Id"
    },
    "selection": {
      "$ref": "#/$defs/ExplorerSelection"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "snapshot_id",
    "selection"
  ],
  "$defs": {
    "ExplorerSelection": {
      "properties": {
        "group_a": {
          "type": "string",
          "maxLength": 512,
          "minLength": 1,
          "title": "Group A"
        },
        "group_b": {
          "type": "string",
          "maxLength": 512,
          "minLength": 1,
          "title": "Group B"
        },
        "benchmark": {
          "type": "string",
          "maxLength": 30,
          "pattern": "^(market:configured|[A-Z0-9-]{1,26}-USD)$",
          "title": "Benchmark",
          "default": "BTC-USD"
        },
        "start": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Start"
        },
        "end": {
          "type": "integer",
          "minimum": 0.0,
          "title": "End"
        },
        "replay_at": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Replay At"
        },
        "filters": {
          "items": {
            "$ref": "#/$defs/MetricFilter"
          },
          "type": "array",
          "maxItems": 12,
          "title": "Filters"
        },
        "members": {
          "anyOf": [
            {
              "items": {
                "type": "string",
                "maxLength": 30,
                "pattern": "^[A-Z0-9-]{1,26}-USD$"
              },
              "type": "array",
              "maxItems": 1000
            },
            {
              "type": "null"
            }
          ],
          "title": "Members"
        },
        "excluded": {
          "items": {
            "type": "string",
            "maxLength": 30,
            "pattern": "^[A-Z0-9-]{1,26}-USD$"
          },
          "type": "array",
          "maxItems": 1000,
          "title": "Excluded"
        },
        "overlays": {
          "items": {
            "type": "string",
            "maxLength": 30,
            "pattern": "^[A-Z0-9-]{1,26}-USD$"
          },
          "type": "array",
          "maxItems": 8,
          "title": "Overlays"
        },
        "overlap": {
          "type": "string",
          "enum": [
            "all",
            "exclude",
            "shared"
          ],
          "title": "Overlap",
          "default": "all"
        },
        "correlation_pair": {
          "anyOf": [
            {
              "items": {
                "type": "string",
                "maxLength": 30,
                "pattern": "^[A-Z0-9-]{1,26}-USD$"
              },
              "type": "array",
              "maxItems": 2,
              "minItems": 2
            },
            {
              "type": "null"
            }
          ],
          "title": "Correlation Pair"
        },
        "correlation_window": {
          "type": "integer",
          "enum": [
            24,
            72
          ],
          "title": "Correlation Window",
          "default": 24
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "group_a",
        "group_b",
        "start",
        "end"
      ],
      "title": "ExplorerSelection"
    },
    "MetricFilter": {
      "properties": {
        "metric": {
          "type": "string",
          "enum": [
            "return_pct",
            "oi_change_pct",
            "funding_pct",
            "volume_usd",
            "long_liquidations_usd",
            "short_liquidations_usd",
            "bid_depth_change_pct",
            "ask_depth_change_pct",
            "spread_bps",
            "depth_balance_pct"
          ],
          "title": "Metric"
        },
        "min": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "metric"
      ],
      "title": "MetricFilter"
    }
  }
}