{
  "additionalProperties": false,
  "description": "Payload shared by ``trade.failed`` and ``trade.compensated``.\n\nThese are two possible names for one lifecycle event \u2014\n``event_type=f\"trade.{terminal_state.value}\"`` in\n``application/commands/settlement.py::TradeSettlementService.settle_failure``,\nwhere ``terminal_state`` is ``FAILED`` (no compensating hold consumed) or\n``COMPENSATED`` (a hold was consumed), per\n``domain/trades.py::failure_terminal_state``. Deliberately excludes any\nfee/posting/balance detail \u2014 that lives only in ``settlement.explained``.\nAlways accompanied by a ``settlement.explained`` event in the same batch.",
  "properties": {
    "failure_class": {
      "title": "Failure Class",
      "type": "string"
    },
    "reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Reason"
    },
    "step_no": {
      "title": "Step No",
      "type": "integer"
    },
    "trade_id": {
      "title": "Trade Id",
      "type": "string"
    }
  },
  "required": [
    "trade_id",
    "step_no",
    "failure_class"
  ],
  "title": "TradeTerminalFailureEventPayload",
  "type": "object"
}
