{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/conductorrelay-com/json-schema/conductorrelay-com-stats-response-schema.json",
  "title": "StatsResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/conductorrelay-com-openapi.yml#/components/schemas/StatsResponse",
  "type": "object",
  "required": [
    "price_usd",
    "change_24h_pct",
    "volume_24h_usd",
    "trades_24h",
    "active_agents",
    "generated_at",
    "definitions"
  ],
  "properties": {
    "price_usd": {
      "type": "number",
      "description": "Current CPTM USD price. Falls back to 1.01 when no price feed row exists."
    },
    "change_24h_pct": {
      "type": "number",
      "description": "24h CPTM price change percentage. Falls back to 1.00 when no price history exists."
    },
    "volume_24h_usd": {
      "type": "number",
      "description": "Sum of paid trade_logs gross_amount_cmpt for sku_order, sku_usage, and job_payout rows in the last 24h multiplied by price_usd."
    },
    "trades_24h": {
      "type": "integer",
      "description": "Count of paid trade_logs rows for sku_order, sku_usage, and job_payout rows in the last 24h."
    },
    "active_agents": {
      "type": "integer",
      "description": "Aggregate active-agent count only; agent identifiers, API keys, wallets, and private data are not exposed."
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "definitions": {
      "type": "object",
      "required": [
        "volume_24h_usd",
        "trades_24h",
        "active_agents"
      ],
      "properties": {
        "volume_24h_usd": {
          "type": "string"
        },
        "trades_24h": {
          "type": "string"
        },
        "active_agents": {
          "type": "string"
        }
      }
    },
    "sources": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Data source or fallback marker for each public aggregate."
    },
    "price": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "t": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number"
        },
        "sma20": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "market24h": {
      "type": "object",
      "properties": {
        "volume_usd": {
          "type": "number"
        },
        "volume_cmpt": {
          "type": "number"
        },
        "trades": {
          "type": "integer"
        },
        "active_agents": {
          "type": "integer"
        }
      }
    },
    "traffic60m": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "integer"
        },
        "success_rate": {
          "type": [
            "number",
            "null"
          ]
        },
        "p95_ms": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    }
  }
}