{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptoetf-today/json-schema/cryptoetf-today-asset-fund-flows-dto-schema.json",
  "title": "AssetFundFlowsDto",
  "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/AssetFundFlowsDto",
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Asset ticker symbol."
    },
    "asset": {
      "type": "string",
      "description": "Internal asset id."
    },
    "windowDays": {
      "type": "number",
      "description": "Days of history this key can read: 30 for every key."
    },
    "days": {
      "description": "Trading days with fund-level data, ordered oldest → newest.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FundDayDto"
      }
    },
    "updatedAt": {
      "type": "string",
      "description": "Response generation time (UTC, ISO 8601)."
    }
  },
  "required": [
    "symbol",
    "asset",
    "windowDays",
    "days",
    "updatedAt"
  ],
  "$defs": {
    "FundDayDto": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "Trading day in UTC (YYYY-MM-DD)."
        },
        "totalUsdM": {
          "type": "number",
          "description": "Sum of the reported funds that day in millions of USD, rounded to 0.1. Funds that have not reported yet count as 0."
        },
        "funds": {
          "description": "Every fund of the asset that was trading on that day.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FundFlowDto"
          }
        }
      },
      "required": [
        "date",
        "totalUsdM",
        "funds"
      ]
    },
    "FundFlowDto": {
      "type": "object",
      "properties": {
        "ticker": {
          "type": "string",
          "description": "Fund ticker."
        },
        "issuer": {
          "type": "string",
          "description": "Issuer of the fund."
        },
        "netFlowUsdM": {
          "type": [
            "number",
            "null"
          ],
          "description": "Net flow of the fund that day in millions of USD, rounded to 0.1 (positive = inflow). 0 = no creations or redemptions; null = no figure for the fund that day (usually not reported yet)."
        }
      },
      "required": [
        "ticker",
        "issuer",
        "netFlowUsdM"
      ]
    }
  }
}