{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickertrac-com/json-schema/tickertrac-com-position-decision-confirmation-in-schema.json",
  "title": "PositionDecisionConfirmationIn",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickertrac-com-openapi.json#/components/schemas/PositionDecisionConfirmationIn",
  "properties": {
    "subject_type": {
      "type": "string",
      "enum": [
        "company_thesis",
        "investment_theme"
      ],
      "title": "Subject Type"
    },
    "subject_version": {
      "type": "integer",
      "exclusiveMinimum": 0.0,
      "title": "Subject Version"
    },
    "watchlist_id": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Watchlist Id"
    },
    "shared_thesis_id": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Shared Thesis Id"
    },
    "ticker": {
      "type": "string",
      "maxLength": 16,
      "minLength": 1,
      "title": "Ticker"
    },
    "action": {
      "type": "string",
      "enum": [
        "opened",
        "added",
        "reduced",
        "closed",
        "reopened"
      ],
      "title": "Action"
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "title": "Occurred At"
    },
    "rationale": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ],
      "title": "Rationale"
    },
    "event_references": {
      "items": {
        "$ref": "#/$defs/PositionDecisionEventReferenceIn"
      },
      "type": "array",
      "maxItems": 10,
      "title": "Event References"
    },
    "execution_price": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Price"
    },
    "execution_currency": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 3,
          "minLength": 3
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Currency"
    },
    "portfolio_weight_before_pct": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Portfolio Weight Before Pct"
    },
    "portfolio_weight_after_pct": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Portfolio Weight After Pct"
    },
    "holding_change_pct": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Holding Change Pct"
    },
    "supersedes_id": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Supersedes Id"
    },
    "schema_version": {
      "type": "string",
      "const": "position-decision-confirmation-v1",
      "title": "Schema Version"
    },
    "idempotency_key": {
      "type": "string",
      "format": "uuid",
      "title": "Idempotency Key"
    },
    "proposal_idempotency_key": {
      "type": "string",
      "format": "uuid",
      "title": "Proposal Idempotency Key"
    },
    "operation": {
      "type": "string",
      "const": "save_position_decision",
      "title": "Operation"
    },
    "confirmation_policy": {
      "type": "string",
      "const": "explicit_approval_required",
      "title": "Confirmation Policy"
    },
    "confirmation_statement": {
      "type": "string",
      "const": "I confirm this exact position decision should be saved as immutable history.",
      "title": "Confirmation Statement"
    },
    "expected_market_reference_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Market Reference Date"
    },
    "expected_market_reference_price": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Market Reference Price"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "subject_type",
    "subject_version",
    "ticker",
    "action",
    "occurred_at",
    "schema_version",
    "idempotency_key",
    "proposal_idempotency_key",
    "operation",
    "confirmation_policy",
    "confirmation_statement"
  ],
  "$defs": {
    "PositionDecisionEventReferenceIn": {
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "alert",
            "source_event",
            "theme_finding"
          ],
          "title": "Kind"
        },
        "referent_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Referent Id"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "kind",
        "referent_id"
      ],
      "title": "PositionDecisionEventReferenceIn"
    }
  }
}