{
  "$id": "https://kartsell.local/contracts/events/signal-decision-created.v2.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "action": {
      "enum": [
        "Hold",
        "PartialSell",
        "FullSell"
      ]
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "datasetId": {
      "minLength": 1,
      "type": "string"
    },
    "decisionContractVersion": {
      "const": "sell-decision.v2"
    },
    "decisionId": {
      "format": "uuid",
      "type": "string"
    },
    "evidenceId": {
      "minLength": 1,
      "type": "string"
    },
    "policyId": {
      "minLength": 1,
      "type": "string"
    },
    "policyTraceSchemaVersion": {
      "const": 2
    },
    "positionLotId": {
      "format": "uuid",
      "type": "string"
    },
    "sellRatioOfLot": {
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "targetSecurityPortfolioWeightAfter": {
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    }
  },
  "required": [
    "decisionId",
    "positionLotId",
    "policyId",
    "action",
    "sellRatioOfLot",
    "targetSecurityPortfolioWeightAfter",
    "evidenceId",
    "datasetId",
    "decisionContractVersion",
    "policyTraceSchemaVersion",
    "createdAt"
  ],
  "title": "SignalDecisionCreated v2",
  "type": "object"
}
