{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/allratestoday-com/json-schema/allratestoday-com-cb-table-dated-schema.json",
  "title": "CbTableDated",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/allratestoday-com-central-bank-rates-api-openapi.yml#/components/schemas/CbTableDated",
  "allOf": [
    {
      "$ref": "#/$defs/CbTable"
    },
    {
      "type": "object",
      "properties": {
        "requested_date": {
          "type": "string",
          "format": "date"
        },
        "published_on_requested_date": {
          "type": "boolean",
          "description": "False when the bank did not publish on the requested date and the most recent prior table is returned"
        }
      }
    }
  ],
  "$defs": {
    "CbRate": {
      "type": "object",
      "properties": {
        "base": {
          "type": "string"
        },
        "quote": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Rate type as labeled by the bank (reference, buying, selling, indicative, ...)"
        },
        "value": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "CbTable": {
      "type": "object",
      "properties": {
        "bank": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "rate_date": {
          "type": "string",
          "format": "date"
        },
        "rates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CbRate"
          }
        },
        "disclaimer": {
          "type": "string"
        }
      }
    }
  }
}