{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/eliq/main/json-schema/eliq-market-price-summary-dto-schema.json",
  "title": "MarketPriceSummaryDto",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eliq-market-price-api-openapi.yml#/components/schemas/MarketPriceSummaryDto",
  "required": [
    "currency",
    "from",
    "resolution",
    "to",
    "values"
  ],
  "type": "object",
  "properties": {
    "resolution": {
      "$ref": "#/$defs/MarketPriceResolution"
    },
    "currency": {
      "minLength": 1,
      "type": "string",
      "description": "Currency of the price_kwh"
    },
    "from": {
      "type": "string",
      "description": "From date"
    },
    "to": {
      "type": "string",
      "description": "To date exclusive"
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MarketPriceSummaryElementDto"
      },
      "description": "Values in the specified resolution. The size always matches the number of periods between from and to in the given resolution. Collection may contain null entries for periods with no data."
    }
  },
  "$defs": {
    "MarketPriceElementDto": {
      "required": [
        "period_start",
        "price_kwh"
      ],
      "type": "object",
      "properties": {
        "period_start": {
          "type": "string",
          "description": "Market price period start"
        },
        "price_kwh": {
          "type": "number",
          "description": "Market price during period per kwh",
          "format": "double"
        }
      }
    },
    "MarketPriceResolution": {
      "enum": [
        "day",
        "month"
      ],
      "type": "string"
    },
    "MarketPriceSummaryElementDto": {
      "required": [
        "avg_price_kwh",
        "highest_price_kwh",
        "lowest_price_kwh",
        "period_start",
        "price_level",
        "values"
      ],
      "type": "object",
      "properties": {
        "period_start": {
          "type": "string",
          "description": "The start of the daily/monthly period"
        },
        "avg_price_kwh": {
          "type": "number",
          "description": "Average daily/monthly price per kwh",
          "format": "double"
        },
        "price_level": {
          "$ref": "#/$defs/PriceLevel"
        },
        "lowest_price_kwh": {
          "$ref": "#/$defs/MarketPriceElementDto"
        },
        "highest_price_kwh": {
          "$ref": "#/$defs/MarketPriceElementDto"
        },
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MarketPriceElementDto"
          },
          "description": "All summary period prices"
        }
      }
    },
    "PriceLevel": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "type": "string"
    }
  }
}