{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/currencycore/json-schema/currencycore-convert-response-schema.json",
  "title": "ConvertResponse",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/currencycore-api-openapi.json#/components/schemas/ConvertResponse",
  "type": "object",
  "properties": {
    "from": {
      "type": "string"
    },
    "fromCountry": {
      "type": "string"
    },
    "amount": {
      "type": "number"
    },
    "date": {
      "type": "string"
    },
    "requestedDate": {
      "type": "string"
    },
    "asOf": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "toCountry": {
            "type": "string"
          },
          "result": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          },
          "ppp": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "fromFactor": {
                    "type": "number"
                  },
                  "toFactor": {
                    "type": "number"
                  },
                  "result": {
                    "type": "number"
                  },
                  "year": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "required": [
                  "fromFactor",
                  "toFactor",
                  "result",
                  "year",
                  "source"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "string"
                  }
                },
                "required": [
                  "error"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "to",
          "result",
          "rate"
        ],
        "additionalProperties": false
      }
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "from",
    "amount",
    "date",
    "results"
  ],
  "additionalProperties": false
}