{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptoetf-today/json-schema/cryptoetf-today-weekly-analytics-dto-schema.json",
  "title": "WeeklyAnalyticsDto",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/cryptoetf-today-v1-openapi.json#/components/schemas/WeeklyAnalyticsDto",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "Window start (UTC, inclusive): six days before `to`."
    },
    "to": {
      "type": "string",
      "description": "Window end (UTC, inclusive): today, so the latest day may not be published yet."
    },
    "assets": {
      "description": "One entry per tracked asset.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/WeeklyAssetDto"
      }
    }
  },
  "required": [
    "from",
    "to",
    "assets"
  ],
  "$defs": {
    "WeeklyAssetDto": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string",
          "description": "Ticker symbol."
        },
        "asset": {
          "type": "string",
          "description": "Internal asset id."
        },
        "netFlowUsdM": {
          "type": "number",
          "description": "Total net flow over the window, millions of USD, rounded to 0.1."
        },
        "avgDailyUsdM": {
          "type": "number",
          "description": "Total divided by the number of days listed in the window: 7 for btc, eth, sol, xrp and hyp (weekends count as 0), trading days only for the other assets. Millions of USD."
        },
        "positiveDays": {
          "type": "number",
          "description": "Number of days with net inflow (> 0) in the window."
        },
        "negativeDays": {
          "type": "number",
          "description": "Number of days with net outflow (< 0) in the window."
        }
      },
      "required": [
        "symbol",
        "asset",
        "netFlowUsdM",
        "avgDailyUsdM",
        "positiveDays",
        "negativeDays"
      ]
    }
  }
}