{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-crypto-health-response-schema.json",
  "title": "CryptoHealthResponse",
  "description": "Health response for Reddit Crypto service.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-health-check-api-openapi.yml#/components/schemas/CryptoHealthResponse",
  "properties": {
    "status": {
      "type": "string",
      "title": "Status"
    },
    "service": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Service"
    },
    "version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Version"
    },
    "total_mentions": {
      "type": "integer",
      "title": "Total Mentions",
      "description": "Mentions observed in the most recent scrape cycle; returns 0 when scrape telemetry is unavailable.",
      "default": 0
    },
    "tokens_tracked": {
      "type": "integer",
      "title": "Tokens Tracked",
      "description": "Distinct symbols observed in the most recent scrape cycle; returns 0 when scrape telemetry is unavailable.",
      "default": 0
    },
    "scheduler": {
      "anyOf": [
        {
          "$ref": "#/$defs/CryptoSchedulerStatus"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    }
  },
  "type": "object",
  "required": [
    "status"
  ],
  "$defs": {
    "CryptoSchedulerStatus": {
      "properties": {
        "running": {
          "type": "boolean",
          "title": "Running",
          "description": "Whether worker heartbeat is fresh"
        },
        "last_scrape": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Scrape",
          "description": "Last scrape timestamp"
        },
        "scrape_count": {
          "type": "integer",
          "title": "Scrape Count",
          "description": "Total scrapes",
          "default": 0
        },
        "error_count": {
          "type": "integer",
          "title": "Error Count",
          "description": "Total failed scrapes",
          "default": 0
        },
        "success_rate": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Success Rate",
          "description": "Success ratio"
        },
        "timed_out_scrape_threads": {
          "type": "integer",
          "title": "Timed Out Scrape Threads",
          "description": "Timed-out Tor scrape attempts observed since the last successful reset.",
          "default": 0
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note",
          "description": "Additional status information"
        }
      },
      "type": "object",
      "required": [
        "running"
      ],
      "title": "CryptoSchedulerStatus",
      "description": "Crypto worker heartbeat status."
    }
  }
}