{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fxmacrodata/json-schema/fxmacrodata-calendar-response-schema.json",
  "title": "CalendarResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fxmacrodata-calendar-api-openapi.yml#/components/schemas/CalendarResponse",
  "properties": {
    "currency": {
      "type": "string",
      "title": "Currency"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timezone"
    },
    "requested_timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requested Timezone"
    },
    "indicator": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Indicator"
    },
    "requested_indicator": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requested Indicator"
    },
    "start_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Date"
    },
    "history_start_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "History Start Date"
    },
    "history_truncated": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "History Truncated"
    },
    "data_quality": {
      "$ref": "#/$defs/DataQuality"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/CalendarReleaseRow"
      },
      "type": "array",
      "title": "Data"
    }
  },
  "type": "object",
  "required": [
    "currency",
    "data_quality",
    "data"
  ],
  "$defs": {
    "CalendarReleaseRow": {
      "properties": {
        "announcement_datetime": {
          "type": "integer",
          "title": "Announcement Datetime"
        },
        "release": {
          "type": "string",
          "title": "Release"
        },
        "calendar_event_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Calendar Event Id"
        },
        "announcement_datetime_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Announcement Datetime Utc"
        },
        "announcement_datetime_local": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Announcement Datetime Local"
        },
        "announcement_datetime_requested_timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Announcement Datetime Requested Timezone"
        },
        "release_date_confirmed": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Date Confirmed"
        },
        "release_time_assumed": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Time Assumed"
        },
        "release_time_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Time Status"
        },
        "release_date_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Date Status"
        },
        "release_time_assumption": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Time Assumption"
        },
        "time_announced": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Time Announced",
          "description": "true when the official publisher has announced the exact release time, so announcement_datetime is the scheduled release instant. false when the publisher has announced only the release date (time not announced): announcement_date then holds the publisher's local date, announcement_datetime is 00:00 of that date in the publisher's timezone and is a day marker, not a release time. false is also used for rows with release_time_assumed=true. A row with time_announced=false is replaced by a timed row once an official source publishes the time."
        },
        "announcement_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Announcement Date",
          "description": "Official release date (YYYY-MM-DD) in the publisher's local timezone. Present when time_announced is false because the publisher has announced the date but not the time."
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit",
          "description": "Unit of the corresponding normalized historical series."
        },
        "value_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value Unit",
          "description": "Unit of the values this release publishes, as served by /v1/announcements/{currency}/{indicator} for the same release (for example Persons, %YoY, Million Barrels). Taken from the series catalogue; omitted when the catalogue declares no unit."
        },
        "frequency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frequency",
          "description": "Observation frequency of the corresponding historical series."
        },
        "annualization": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Annualization",
          "description": "Declared annualization basis of the historical series, such as SAAR for an annual-rate level."
        },
        "annualization_source_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Annualization Source Url",
          "description": "Official source documenting the declared annualization basis; not captured-vintage evidence."
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "source_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Url"
        },
        "source_release": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Release"
        },
        "schedule_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Schedule Url"
        },
        "release_stage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Release Stage"
        },
        "reference_period": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reference Period"
        },
        "dataset_codes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Dataset Codes"
        },
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date"
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Domain"
        },
        "data_currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Currency"
        },
        "endpoint_family": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Endpoint Family"
        },
        "endpoint_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Endpoint Path"
        },
        "requires_api_key": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requires Api Key"
        },
        "event_importance": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Event Importance",
          "description": "high, medium or low. Always consistent with market_tier (1 = high, 2 = medium, 3 = low)."
        },
        "market_tier": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Market Tier",
          "description": "Cross-market importance tier of the release type (1 = policy rates, CPI, GDP, labour market, retail sales; 2 = trade, PPI, surveys; 3 = everything else). A release listed as top tier for the row's own currency is promoted to 1."
        },
        "top_tier_for_currency": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Top Tier For Currency",
          "description": "True when the release is one of the handful of events that move this currency, from the per-currency list in calendar_top_tier_overrides.json (e.g. dairy exports for NZD, Tankan for JPY, IPCA-15 for BRL). Currencies without a list use market_tier == 1. A global tier-1 release can therefore carry market_tier 1 with top_tier_for_currency false."
        }
      },
      "type": "object",
      "required": [
        "announcement_datetime",
        "release"
      ],
      "title": "CalendarReleaseRow"
    },
    "CommodityCoverage": {
      "properties": {
        "scope": {
          "type": "string",
          "title": "Scope"
        },
        "requested_start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested Start"
        },
        "requested_end": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested End"
        },
        "available_start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Available Start"
        },
        "available_end": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Available End"
        },
        "input_row_count": {
          "type": "integer",
          "title": "Input Row Count"
        },
        "row_count": {
          "type": "integer",
          "title": "Row Count"
        },
        "distinct_date_count": {
          "type": "integer",
          "title": "Distinct Date Count"
        },
        "duplicate_date_row_count": {
          "type": "integer",
          "title": "Duplicate Date Row Count"
        },
        "excluded_weekend_row_count": {
          "type": "integer",
          "title": "Excluded Weekend Row Count"
        },
        "invalid_date_row_count": {
          "type": "integer",
          "title": "Invalid Date Row Count"
        },
        "expected_weekday_label_count": {
          "type": "integer",
          "title": "Expected Weekday Label Count"
        },
        "missing_weekday_label_count": {
          "type": "integer",
          "title": "Missing Weekday Label Count"
        },
        "largest_missing_weekday_run": {
          "type": "integer",
          "title": "Largest Missing Weekday Run"
        },
        "largest_calendar_gap_days": {
          "type": "integer",
          "title": "Largest Calendar Gap Days"
        },
        "missing_weekday_ranges": {
          "items": {
            "$ref": "#/$defs/CommodityMissingWeekdayRange"
          },
          "type": "array",
          "title": "Missing Weekday Ranges"
        },
        "longest_continuous_weekday_segment": {
          "$ref": "#/$defs/CommodityCoverageSegment"
        },
        "latest_continuous_weekday_segment": {
          "$ref": "#/$defs/CommodityCoverageSegment"
        },
        "sparse_history": {
          "type": "boolean",
          "title": "Sparse History"
        },
        "coverage_basis": {
          "type": "string",
          "title": "Coverage Basis"
        },
        "continuous_coverage_verified": {
          "type": "boolean",
          "title": "Continuous Coverage Verified",
          "default": false
        },
        "reference_only": {
          "type": "boolean",
          "title": "Reference Only",
          "default": true
        },
        "executable_quotes": {
          "type": "boolean",
          "title": "Executable Quotes",
          "default": false
        },
        "provenance_version": {
          "type": "integer",
          "title": "Provenance Version"
        },
        "repaired_excluded_weekend_row_count": {
          "type": "integer",
          "title": "Repaired Excluded Weekend Row Count",
          "default": 0
        },
        "repaired_invalid_date_row_count": {
          "type": "integer",
          "title": "Repaired Invalid Date Row Count",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "scope",
        "input_row_count",
        "row_count",
        "distinct_date_count",
        "duplicate_date_row_count",
        "excluded_weekend_row_count",
        "invalid_date_row_count",
        "expected_weekday_label_count",
        "missing_weekday_label_count",
        "largest_missing_weekday_run",
        "largest_calendar_gap_days",
        "missing_weekday_ranges",
        "longest_continuous_weekday_segment",
        "latest_continuous_weekday_segment",
        "sparse_history",
        "coverage_basis",
        "provenance_version"
      ],
      "title": "CommodityCoverage"
    },
    "CommodityCoverageSegment": {
      "properties": {
        "start_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Date"
        },
        "end_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "End Date"
        },
        "row_count": {
          "type": "integer",
          "title": "Row Count"
        }
      },
      "type": "object",
      "required": [
        "row_count"
      ],
      "title": "CommodityCoverageSegment"
    },
    "CommodityMissingWeekdayRange": {
      "properties": {
        "start_date": {
          "type": "string",
          "title": "Start Date"
        },
        "end_date": {
          "type": "string",
          "title": "End Date"
        },
        "weekday_count": {
          "type": "integer",
          "title": "Weekday Count"
        }
      },
      "type": "object",
      "required": [
        "start_date",
        "end_date",
        "weekday_count"
      ],
      "title": "CommodityMissingWeekdayRange"
    },
    "DataQuality": {
      "properties": {
        "source_freshness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Freshness"
        },
        "source_monitoring_complete": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Monitoring Complete"
        },
        "known_source_gap": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Known Source Gap"
        },
        "source_checked_at": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Checked At"
        },
        "source_check_expires_at": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Check Expires At"
        },
        "latest_published_period": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Latest Published Period"
        },
        "source_permission_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Permission Status"
        },
        "commodity_coverage": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityCoverage"
            },
            {
              "type": "null"
            }
          ]
        },
        "stored_history_coverage": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityCoverage"
            },
            {
              "type": "null"
            }
          ]
        },
        "point_in_time_basis": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Point In Time Basis"
        },
        "is_official": {
          "type": "boolean",
          "title": "Is Official"
        },
        "is_proxy": {
          "type": "boolean",
          "title": "Is Proxy"
        },
        "is_fallback": {
          "type": "boolean",
          "title": "Is Fallback"
        },
        "is_stale": {
          "type": "boolean",
          "title": "Is Stale"
        },
        "has_announcement_datetime": {
          "type": "boolean",
          "title": "Has Announcement Datetime"
        },
        "point_in_time_safe": {
          "type": "boolean",
          "title": "Point In Time Safe",
          "description": "Whether the returned values have verified availability and vintage evidence; estimated release times do not qualify."
        },
        "unverified_vintage_count": {
          "type": "integer",
          "title": "Unverified Vintage Count",
          "default": 0
        },
        "unknown_publication_time_count": {
          "type": "integer",
          "title": "Unknown Publication Time Count",
          "default": 0
        },
        "latest_available_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Latest Available Date"
        },
        "last_updated": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Updated"
        },
        "data_lag_days": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Lag Days"
        },
        "source_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Name"
        },
        "source_type": {
          "type": "string",
          "enum": [
            "official",
            "public",
            "fallback",
            "derived"
          ],
          "title": "Source Type"
        },
        "is_derived": {
          "type": "boolean",
          "title": "Is Derived",
          "default": false
        },
        "row_count": {
          "type": "integer",
          "title": "Row Count",
          "default": 0
        },
        "announcement_datetime_count": {
          "type": "integer",
          "title": "Announcement Datetime Count",
          "default": 0
        },
        "missing_announcement_datetime_count": {
          "type": "integer",
          "title": "Missing Announcement Datetime Count",
          "default": 0
        },
        "has_assumed_release_times": {
          "type": "boolean",
          "title": "Has Assumed Release Times",
          "description": "True when at least one row in the quality scope carries a publication timestamp derived from the publication lag measured on that series' own confirmed releases, because no official release calendar reaches the period.",
          "default": false
        },
        "assumed_release_time_count": {
          "type": "integer",
          "title": "Assumed Release Time Count",
          "description": "Number of rows in the quality scope whose publication timestamp was derived rather than captured. Compare against row_count to size the derived portion of the requested window.",
          "default": 0
        },
        "bounded_release_time_count": {
          "type": "integer",
          "title": "Bounded Release Time Count",
          "description": "Legacy rows carrying an upper-bound estimate flag; this does not certify replay safety.",
          "default": 0
        },
        "unbounded_release_time_count": {
          "type": "integer",
          "title": "Unbounded Release Time Count",
          "description": "Assumed timestamps without proven availability bounds.",
          "default": 0
        },
        "quality_scope": {
          "type": "string",
          "title": "Quality Scope",
          "default": "full_result"
        },
        "stale_after_days": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Stale After Days"
        },
        "requested_window_has_data": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested Window Has Data"
        },
        "requested_window_latest_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested Window Latest Date"
        },
        "requested_window_includes_latest_available": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested Window Includes Latest Available"
        },
        "page_includes_latest_available": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Includes Latest Available"
        },
        "returned_latest_available_before_window": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Returned Latest Available Before Window"
        },
        "staleness_days": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Staleness Days"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "datetime_field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Datetime Field"
        },
        "datetime_precision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Datetime Precision"
        },
        "datetime_semantics": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Datetime Semantics"
        },
        "source_legs": {
          "anyOf": [
            {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Legs"
        },
        "historical_point_in_time": {
          "anyOf": [
            {
              "$ref": "#/$defs/PointInTimeCompleteness"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "is_official",
        "is_proxy",
        "is_fallback",
        "is_stale",
        "has_announcement_datetime",
        "point_in_time_safe",
        "source_type"
      ],
      "title": "DataQuality"
    },
    "PointInTimeCompleteness": {
      "properties": {
        "row_count": {
          "type": "integer",
          "title": "Row Count"
        },
        "announcement_datetime_count": {
          "type": "integer",
          "title": "Announcement Datetime Count"
        },
        "missing_announcement_datetime_count": {
          "type": "integer",
          "title": "Missing Announcement Datetime Count"
        },
        "assumed_release_time_count": {
          "type": "integer",
          "title": "Assumed Release Time Count",
          "default": 0
        },
        "bounded_release_time_count": {
          "type": "integer",
          "title": "Bounded Release Time Count",
          "default": 0
        },
        "unbounded_release_time_count": {
          "type": "integer",
          "title": "Unbounded Release Time Count",
          "default": 0
        },
        "unverified_vintage_count": {
          "type": "integer",
          "title": "Unverified Vintage Count",
          "default": 0
        },
        "unknown_publication_time_count": {
          "type": "integer",
          "title": "Unknown Publication Time Count",
          "default": 0
        },
        "point_in_time_safe": {
          "type": "boolean",
          "title": "Point In Time Safe"
        }
      },
      "type": "object",
      "required": [
        "row_count",
        "announcement_datetime_count",
        "missing_announcement_datetime_count",
        "point_in_time_safe"
      ],
      "title": "PointInTimeCompleteness",
      "description": "Coverage of source-confirmed publication timestamps for a dataset."
    }
  }
}