{
  "openapi": "3.1.0",
  "info": {
    "title": "CascadeWatch",
    "version": "1.0.0",
    "contact": {
      "email": "jay@lonestaroracle.xyz"
    },
    "x-guidance": "DeFi liquidation cascade risk monitor. Tracks positions near liquidation on Morpho Blue + Aave V3. Returns cascade risk score, at-risk positions, liquidatable collateral, and potential cascade volume. Also /cascade and /report endpoints. $0.10/query via x402. | Also: DeFiRisk (defi.lonestaroracle.xyz) StakeEdge (stake.lonestaroracle.xyz) | Full catalog: lonestaroracle.xyz",
    "description": "Cross-market systemic and contagion-cascade risk signal. /risk, /cascade."
  },
  "externalDocs": {
    "url": "https://docs.lonestaroracle.xyz",
    "description": "LoneStarOracle API & integration docs"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/risk": {
      "get": {
        "summary": "Systemic Cascade Risk",
        "description": "Cross-market systemic and contagion-cascade risk signal. /risk, /cascade.",
        "operationId": "get_risk_risk_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.10"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "tags": [
          "systemic-risk",
          "contagion",
          "macro",
          "cascade"
        ]
      }
    },
    "/cascade": {
      "get": {
        "summary": "Simulate Cascade",
        "description": "Simulate cascade liquidations if a token drops by X percent.",
        "operationId": "simulate_cascade_cascade_get",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Collateral token (ETH, WBTC, wstETH, etc.)",
              "default": "ETH",
              "title": "Token"
            },
            "description": "Collateral token (ETH, WBTC, wstETH, etc.)"
          },
          {
            "name": "drop_pct",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Simulated price drop %",
              "default": 10.0,
              "title": "Drop Pct"
            },
            "description": "Simulated price drop %"
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Chain ID: 1=Ethereum, 8453=Base",
              "default": 1,
              "title": "Chain Id"
            },
            "description": "Chain ID: 1=Ethereum, 8453=Base"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/report": {
      "get": {
        "summary": "Get Report",
        "description": "Full market-by-market liquidation report for Morpho Blue.",
        "operationId": "get_report_report_get",
        "parameters": [
          {
            "name": "chain_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Chain ID: 1=Ethereum, 8453=Base",
              "default": 1,
              "title": "Chain Id"
            },
            "description": "Chain ID: 1=Ethereum, 8453=Base"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/demo": {
      "get": {
        "summary": "Get Demo Cw",
        "description": "Free demo \u2014 returns live cascade risk for ETH collateral.",
        "operationId": "get_demo_cw_demo_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}