{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cryptoetf-today/json-schema/cryptoetf-today-asset-flows-dto-schema.json",
  "title": "AssetFlowsDto",
  "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/AssetFlowsDto",
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Asset ticker symbol."
    },
    "asset": {
      "type": "string",
      "description": "Internal asset id: bitcoin, ethereum, solana, xrp, hyp, then the lowercase symbol (doge, link, …)."
    },
    "windowDays": {
      "type": "number",
      "description": "Days of history this key can read: 30 for every key."
    },
    "days": {
      "description": "Daily net flows, ordered oldest → newest.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FlowPointDto"
      }
    },
    "updatedAt": {
      "type": "string",
      "description": "Response generation time (UTC, ISO 8601)."
    }
  },
  "required": [
    "symbol",
    "asset",
    "windowDays",
    "days",
    "updatedAt"
  ],
  "$defs": {
    "FlowPointDto": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "Day in UTC (YYYY-MM-DD). btc, eth, sol, xrp and hyp list every calendar day; the other assets list trading days only."
        },
        "netFlowUsdM": {
          "type": "number",
          "description": "Net ETF flow for the day in millions of USD, rounded to 0.1. Positive = net inflow, negative = net outflow. For btc, eth, sol, xrp and hyp a weekend or a day not yet published is 0."
        }
      },
      "required": [
        "date",
        "netFlowUsdM"
      ]
    }
  }
}