{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lpsignal-app/json-schema/lpsignal-app-rule-input-schema.json",
  "title": "RuleInput",
  "description": "kind net_apr needs minNet7d; depeg needs minDeviation; tvl_outflow needs minDrop. Thresholds are fractions.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lpsignal-app-openapi.json#/components/schemas/RuleInput",
  "type": "object",
  "required": [
    "name",
    "kind"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 60
    },
    "kind": {
      "type": "string",
      "enum": [
        "net_apr",
        "depeg",
        "tvl_outflow"
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "chains": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "ethereum",
          "bsc",
          "base",
          "arbitrum",
          "optimism",
          "polygon",
          "robinhood"
        ]
      }
    },
    "pools": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "\"<chain>:<address>\""
      },
      "maxItems": 50
    },
    "pairClasses": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "stable",
          "correlated",
          "volatile"
        ]
      }
    },
    "minTvlUsd": {
      "type": "number",
      "minimum": 100000
    },
    "cooldownHours": {
      "type": "integer",
      "minimum": 24,
      "maximum": 720
    },
    "minNet7d": {
      "type": "number"
    },
    "minNet24h": {
      "type": "number"
    },
    "minInRange7d": {
      "type": "number"
    },
    "minDeviation": {
      "type": "number"
    },
    "minDrop": {
      "type": "number"
    },
    "windowHours": {
      "type": "integer",
      "minimum": 1,
      "maximum": 24
    }
  }
}