{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exchangerate-dev/json-schema/exchangerate-dev-index-snapshot-response-schema.json",
  "title": "IndexSnapshotResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/exchangerate-dev-openapi.json#/components/schemas/IndexSnapshotResponse",
  "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"
    },
    "value": {
      "type": "number",
      "title": "Value"
    },
    "timestamp": {
      "type": "string",
      "title": "Timestamp"
    },
    "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"
    },
    "stale": {
      "type": "boolean",
      "title": "Stale"
    },
    "base_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Base Date"
    },
    "weights": {
      "additionalProperties": {
        "type": "number"
      },
      "type": "object",
      "title": "Weights"
    },
    "constituents": {
      "items": {
        "$ref": "#/$defs/IndexConstituent"
      },
      "type": "array",
      "title": "Constituents"
    },
    "notice": {
      "type": "string",
      "title": "Notice"
    }
  },
  "type": "object",
  "required": [
    "index",
    "name",
    "methodology_version",
    "value",
    "timestamp",
    "data_updated_at",
    "source",
    "source_type",
    "market_session",
    "stale",
    "base_date",
    "weights",
    "constituents",
    "notice"
  ],
  "$defs": {
    "IndexConstituent": {
      "properties": {
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "weight": {
          "type": "number",
          "title": "Weight"
        },
        "rate": {
          "type": "number",
          "title": "Rate"
        },
        "effective_at": {
          "type": "string",
          "title": "Effective At"
        },
        "contribution": {
          "type": "number",
          "title": "Contribution"
        }
      },
      "type": "object",
      "required": [
        "currency",
        "weight",
        "rate",
        "effective_at",
        "contribution"
      ],
      "title": "IndexConstituent"
    },
    "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."
    }
  }
}