{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anthid-com/json-schema/anthid-com-patch-risk-control-request-schema.json",
  "title": "PatchRiskControlRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anthid-com-account-risk-controls-api-openapi.yml#/components/schemas/PatchRiskControlRequest",
  "type": "object",
  "properties": {
    "clear": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RiskControlField"
      }
    },
    "max_daily_loss_amount": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/Quantity"
        }
      ]
    },
    "max_daily_loss_percent": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/Percent"
        }
      ]
    },
    "max_order_size": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/Quantity"
        }
      ]
    },
    "max_position_size": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/Quantity"
        }
      ]
    }
  },
  "$defs": {
    "Percent": {
      "type": "string"
    },
    "Quantity": {
      "type": "string"
    },
    "RiskControlField": {
      "type": "string",
      "description": "Fields of a risk control a PATCH may remove.",
      "enum": [
        "max_daily_loss_amount",
        "max_daily_loss_percent",
        "max_position_size",
        "max_order_size"
      ]
    }
  }
}