{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exchangerate-dev/json-schema/exchangerate-dev-index-timeseries-response-schema.json",
  "title": "IndexTimeseriesResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/exchangerate-dev-openapi.json#/components/schemas/IndexTimeseriesResponse",
  "properties": {
    "result": {
      "type": "string",
      "title": "Result",
      "default": "success"
    },
    "index": {
      "type": "string",
      "title": "Index"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "methodology_version": {
      "type": "string",
      "title": "Methodology Version"
    },
    "interval": {
      "type": "string",
      "enum": [
        "1m",
        "5m",
        "15m",
        "1h",
        "4h",
        "1d"
      ],
      "title": "Interval"
    },
    "from": {
      "type": "string",
      "title": "From"
    },
    "to": {
      "type": "string",
      "title": "To"
    },
    "base_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Base Date"
    },
    "weights": {
      "additionalProperties": {
        "type": "number"
      },
      "type": "object",
      "title": "Weights"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/IndexTimeseriesRow"
      },
      "type": "array",
      "title": "Data"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "default": false
    },
    "notice": {
      "type": "string",
      "title": "Notice"
    }
  },
  "type": "object",
  "required": [
    "index",
    "name",
    "methodology_version",
    "interval",
    "from",
    "to",
    "base_date",
    "weights",
    "data",
    "notice"
  ],
  "$defs": {
    "IndexTimeseriesRow": {
      "properties": {
        "timestamp": {
          "type": "string",
          "title": "Timestamp"
        },
        "value": {
          "type": "number",
          "title": "Value"
        },
        "data_updated_at": {
          "type": "string",
          "title": "Data Updated At"
        },
        "source": {
          "$ref": "#/$defs/Source"
        },
        "source_type": {
          "type": "string",
          "enum": [
            "market",
            "reference"
          ],
          "title": "Source Type"
        },
        "market_session": {
          "$ref": "#/$defs/MarketSession"
        }
      },
      "type": "object",
      "required": [
        "timestamp",
        "value",
        "data_updated_at",
        "source",
        "source_type",
        "market_session"
      ],
      "title": "IndexTimeseriesRow"
    },
    "MarketSession": {
      "type": "string",
      "enum": [
        "open",
        "weekend",
        "interbank_closed"
      ],
      "title": "MarketSession",
      "description": "Computed from a clock, no feed (D9). `interbank_closed` = a known non-weekend closure\n(e.g. an ECB/TARGET2 holiday detected via an empty Tier-C response — INGESTION §4)."
    },
    "Source": {
      "type": "string",
      "enum": [
        "live",
        "ecb_daily",
        "market_daily"
      ],
      "title": "Source",
      "description": "Public `source` enum — wire contract (D2). NO `cached` value (cache lives in X-Cache).\n\n`ecb_daily` is the only reference source (October 2026).\n`market_daily` labels the stored daily close of the live market feed, for the currencies with\nno reference fix, in date history and 1d time series; it is never a live rate."
    }
  }
}