{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zarq-ai/json-schema/zarq-ai-stresstest-request-schema.json",
  "title": "StresstestRequest",
  "description": "Request body for portfolio stress test.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zarq-ai-openapi.json#/components/schemas/StresstestRequest",
  "properties": {
    "holdings": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Holdings",
      "description": "Token holdings as {token_id: weight}. Example: {\"bitcoin\": 0.5, \"ethereum\": 0.3, \"solana\": 0.2}"
    },
    "portfolio_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Portfolio Id",
      "description": "Predefined portfolio: alpha_fund, dynamic_fund, conservative_fund, btc_only, top10_equal"
    },
    "scenario": {
      "type": "string",
      "title": "Scenario",
      "description": "Scenario: btc_crash_50pct, eth_smart_contract_exploit, stablecoin_crisis, regulatory_crackdown",
      "default": "btc_crash_50pct"
    },
    "portfolio_value_usd": {
      "type": "number",
      "title": "Portfolio Value Usd",
      "description": "Total portfolio value in USD",
      "default": 100000
    }
  },
  "type": "object"
}