{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickfeed-pro/json-schema/tickfeed-pro-public-health-response-schema.json",
  "title": "PublicHealthResponse",
  "description": "Health as shown to external callers: service state and data freshness, no internals.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickfeed-pro-openapi.json#/components/schemas/PublicHealthResponse",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "degraded",
        "down"
      ],
      "title": "Status"
    },
    "feeds": {
      "items": {
        "$ref": "#/$defs/PublicFeed"
      },
      "type": "array",
      "title": "Feeds"
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "title": "Checked At"
    }
  },
  "type": "object",
  "required": [
    "status",
    "feeds",
    "checked_at"
  ],
  "$defs": {
    "PublicFeed": {
      "properties": {
        "symbol": {
          "type": "string",
          "title": "Symbol"
        },
        "market_open": {
          "type": "boolean",
          "title": "Market Open"
        },
        "status": {
          "type": "string",
          "enum": [
            "fresh",
            "market_closed",
            "stale",
            "unavailable"
          ],
          "title": "Status",
          "description": "fresh: last tick no older than stale_after_seconds. market_closed: older, but the market is outside its scheduled session (or within the grace period right after it opened). stale: older while the market is scheduled to be trading, which indicates a feed problem."
        },
        "last_tick_time": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Tick Time"
        },
        "age_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Age Seconds"
        }
      },
      "type": "object",
      "required": [
        "symbol",
        "market_open",
        "status",
        "last_tick_time",
        "age_seconds"
      ],
      "title": "PublicFeed"
    }
  }
}