{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rapidtradeview-trade/json-schema/rapidtradeview-trade-earnings-week-schema.json",
  "title": "EarningsWeek",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rapidtradeview-trade-openapi.json#/components/schemas/EarningsWeek",
  "type": "object",
  "properties": {
    "week_start": {
      "type": "string",
      "format": "date"
    },
    "week_end": {
      "type": "string",
      "format": "date"
    },
    "count": {
      "type": "integer",
      "description": "Reports in the week, each company once"
    },
    "truncated": {
      "type": "boolean"
    },
    "moved_out": {
      "type": "integer",
      "description": "Companies whose confirmed date falls outside this week; they stay listed here on the calendar's date with date_confirmed false."
    },
    "scope": {
      "type": "string",
      "description": "all, for scope=all"
    },
    "source": {
      "type": "string"
    },
    "days": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "count": {
            "type": "integer",
            "description": "scope=all: the day's true count"
          },
          "truncated": {
            "type": "boolean"
          },
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/EarningsCalendarRow"
            }
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "EarningsCalendarRow": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "hour": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "bmo",
            "amc",
            "dmh",
            null
          ],
          "description": "Before the open, after the close, during market hours; null when not given"
        },
        "date_confirmed": {
          "type": "boolean",
          "description": "Large covered companies ($10B+): true only when market data shows the company's confirmed date. Other rows: true when a session is given. false: the calendar's listing, not confirmed as the company's date"
        },
        "date_confirmed_source": {
          "type": "string",
          "enum": [
            "calendar",
            "company"
          ],
          "description": "calendar: the calendar's date. company: moved to the company's confirmed date"
        },
        "quarter": {
          "type": [
            "integer",
            "null"
          ]
        },
        "year": {
          "type": [
            "integer",
            "null"
          ]
        },
        "eps_estimate": {
          "type": [
            "number",
            "null"
          ]
        },
        "eps_actual": {
          "type": [
            "number",
            "null"
          ]
        },
        "revenue_estimate": {
          "type": [
            "number",
            "null"
          ]
        },
        "revenue_actual": {
          "type": [
            "number",
            "null"
          ]
        },
        "in_universe": {
          "type": "boolean",
          "description": "scope=all only"
        },
        "market_cap": {
          "type": [
            "number",
            "null"
          ],
          "description": "scope=all only; covered stocks"
        }
      },
      "required": [
        "symbol",
        "date",
        "hour",
        "date_confirmed",
        "date_confirmed_source"
      ],
      "additionalProperties": true
    }
  }
}