{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/farmdash/json-schema/farmdash-autopilot-config-schema.json",
  "title": "AutopilotConfig",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/farmdash-autopilot-api-openapi.yml#/components/schemas/AutopilotConfig",
  "type": "object",
  "properties": {
    "strategies": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "funding_arb",
          "momentum",
          "mean_reversion",
          "portfolio_rebalance",
          "full_auto"
        ]
      }
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "maxEquityPct": {
      "type": "number"
    },
    "rebalanceIntervalMin": {
      "type": "integer"
    },
    "autoCompound": {
      "type": "boolean"
    },
    "riskPreference": {
      "type": "string",
      "enum": [
        "conservative",
        "balanced",
        "aggressive"
      ]
    },
    "riskSentinel": {
      "$ref": "#/$defs/RiskSentinelConfig"
    },
    "executionAlpha": {
      "$ref": "#/$defs/ExecutionAlphaConfig"
    }
  },
  "$defs": {
    "ExecutionAlphaConfig": {
      "type": "object",
      "properties": {
        "mevSafetyMode": {
          "$ref": "#/$defs/SwapSafetyMode"
        },
        "maxQuoteDecayBps": {
          "type": "number"
        },
        "maxGasUsdPerAction": {
          "type": "number"
        },
        "requirePositiveNetEdge": {
          "type": "boolean"
        },
        "minNetEdgeUsd": {
          "type": "number"
        }
      }
    },
    "RiskSentinelConfig": {
      "type": "object",
      "properties": {
        "minHealthFactor": {
          "type": "number"
        },
        "minLiquidationBufferPct": {
          "type": "number"
        },
        "maxStablecoinDepegPct": {
          "type": "number"
        }
      }
    },
    "SwapSafetyMode": {
      "type": "string",
      "enum": [
        "strict",
        "balanced"
      ]
    }
  }
}