{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exchangerate-dev/json-schema/exchangerate-dev-convert-response-schema.json",
  "title": "ConvertResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/exchangerate-dev-openapi.json#/components/schemas/ConvertResponse",
  "properties": {
    "result": {
      "type": "string",
      "title": "Result",
      "default": "success"
    },
    "from": {
      "type": "string",
      "title": "From"
    },
    "to": {
      "type": "string",
      "title": "To"
    },
    "amount": {
      "type": "number",
      "title": "Amount"
    },
    "rate": {
      "type": "number",
      "title": "Rate"
    },
    "converted": {
      "type": "number",
      "title": "Converted"
    },
    "derived": {
      "type": "boolean",
      "title": "Derived"
    },
    "derivation_bps_max": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Derivation Bps Max"
    },
    "source": {
      "$ref": "#/$defs/Source"
    },
    "sources": {
      "additionalProperties": {
        "$ref": "#/$defs/Source"
      },
      "type": "object",
      "title": "Sources"
    },
    "stale": {
      "type": "boolean",
      "title": "Stale"
    },
    "market_session": {
      "$ref": "#/$defs/MarketSession"
    },
    "timestamp": {
      "type": "string",
      "title": "Timestamp"
    },
    "data_updated_at": {
      "type": "string",
      "title": "Data Updated At"
    },
    "notice": {
      "type": "string",
      "title": "Notice"
    }
  },
  "type": "object",
  "required": [
    "from",
    "to",
    "amount",
    "rate",
    "converted",
    "derived",
    "source",
    "sources",
    "stale",
    "market_session",
    "timestamp",
    "data_updated_at",
    "notice"
  ],
  "$defs": {
    "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."
    }
  }
}