{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-fx-rates-schema.json",
  "title": "FxRates",
  "description": "Paid. FX rates + conversion (live, with the ECB rate beside it).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-fx-api-openapi.yml#/components/schemas/FxRates",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "The currency converted FROM"
    },
    "amount": {
      "type": "number",
      "description": "The amount of `from` converted"
    },
    "rates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "rate": {
            "type": [
              "number",
              "null"
            ]
          },
          "converted": {
            "type": [
              "number",
              "null"
            ]
          },
          "ecbRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "deviationFromEcbPct": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "to",
          "rate",
          "converted",
          "ecbRate",
          "deviationFromEcbPct"
        ]
      },
      "description": "One row per target currency"
    },
    "ecbDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date of the ECB reference fixing used for ecbRate, or null"
    },
    "source": {
      "type": "string",
      "description": "Where the rates came from"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time the live rates were read"
    },
    "note": {
      "type": "string",
      "description": "How to read a rate, and its limits"
    }
  },
  "required": [
    "from",
    "amount",
    "rates",
    "ecbDate",
    "source",
    "asOf",
    "note"
  ]
}