{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quantustik-com/json-schema/quantustik-com-earnings-response-schema.json",
  "title": "EarningsResponse",
  "description": "Per-ticker earnings calendar.\n\nA first-class risk gate: swing BUYs are suppressed within 5 days of\nearnings, so an agent must be able to see the earnings clock to\nreason about overnight gap risk. ``available: false`` (with HTTP 200)\nsignals \"no earnings data\" — a normal cold-cache state, not an error.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quantustik-com-openapi.json#/components/schemas/EarningsResponse",
  "properties": {
    "ticker": {
      "type": "string",
      "title": "Ticker"
    },
    "available": {
      "type": "boolean",
      "title": "Available",
      "default": false
    },
    "next": {
      "anyOf": [
        {
          "$ref": "#/$defs/EarningsNext"
        },
        {
          "type": "null"
        }
      ]
    },
    "last": {
      "anyOf": [
        {
          "$ref": "#/$defs/EarningsLast"
        },
        {
          "type": "null"
        }
      ]
    },
    "days_until_next": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Days Until Next",
      "description": "How many calendar days from the `as_of` date until the company next reports earnings. Null when we do not know the date."
    },
    "as_of": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "As Of",
      "description": "Date the calendar was computed (data-freshness anchor)."
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "ticker"
  ],
  "$defs": {
    "EarningsLast": {
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date"
        },
        "eps": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eps"
        },
        "eps_estimated": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eps Estimated"
        },
        "revenue": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revenue"
        },
        "revenue_estimated": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revenue Estimated"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "EarningsLast",
      "description": "Last-reported earnings event (actuals vs. estimates)."
    },
    "EarningsNext": {
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date"
        },
        "eps_estimated": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eps Estimated"
        },
        "revenue_estimated": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revenue Estimated"
        },
        "time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Time",
          "description": "Session timing: \"amc\" (after close), \"bmo\" (before open), or null."
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "EarningsNext",
      "description": "Next-upcoming earnings event (estimates only — not yet reported)."
    }
  }
}