{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-corporate-action-event-schema.json",
  "title": "corporate_action_event",
  "description": "A single corporate-action mutation delivered over the\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n\nEvery event uses the same envelope. The `event_type` field selects which of\nthe 15 per-type schemas populates `ca`; see\n[`corporate_action_event_type`](#/components/schemas/corporate_action_event_type)\nfor the full mapping and follow the link on each row to the per-type `ca`\npayload schema.\n\nOptional fields (including `currency` and, on most CA types, `isin`) are\nomitted from the JSON when empty; `null` is never emitted.\n",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-us-market-data-api-openapi.yml#/components/schemas/corporate_action_event",
  "oneOf": [
    {
      "$ref": "#/$defs/corporate_action_event_capital_gains_distribution"
    },
    {
      "$ref": "#/$defs/corporate_action_event_cash_dividend"
    },
    {
      "$ref": "#/$defs/corporate_action_event_cash_merger"
    },
    {
      "$ref": "#/$defs/corporate_action_event_equity_partial_call"
    },
    {
      "$ref": "#/$defs/corporate_action_event_forward_split"
    },
    {
      "$ref": "#/$defs/corporate_action_event_name_change"
    },
    {
      "$ref": "#/$defs/corporate_action_event_redemption"
    },
    {
      "$ref": "#/$defs/corporate_action_event_reorganization"
    },
    {
      "$ref": "#/$defs/corporate_action_event_reverse_split"
    },
    {
      "$ref": "#/$defs/corporate_action_event_rights_distribution"
    },
    {
      "$ref": "#/$defs/corporate_action_event_spin_off"
    },
    {
      "$ref": "#/$defs/corporate_action_event_stock_and_cash_merger"
    },
    {
      "$ref": "#/$defs/corporate_action_event_stock_dividend"
    },
    {
      "$ref": "#/$defs/corporate_action_event_stock_merger"
    },
    {
      "$ref": "#/$defs/corporate_action_event_unit_split"
    },
    {
      "$ref": "#/$defs/corporate_action_event_worthless_removal"
    }
  ],
  "$defs": {
    "ca_event_base": {
      "description": "Common fields present on every `ca` payload regardless of `event_type`.\nNot meant to be referenced directly by clients -- it exists so each\nper-type payload schema (`ca_event_cash_dividend`, `ca_event_forward_split`,\n...) can `allOf`-compose it instead of restating `id` and `process_date`.\nThis makes the \"always present\" invariant structural (guaranteed by the\nschema) rather than emergent from repetition, and matches the \"Common `ca`\nfields\" section of the event-streaming Corporate Actions SSE design doc.\n",
      "properties": {
        "id": {
          "$ref": "#/$defs/ca_id"
        },
        "process_date": {
          "$ref": "#/$defs/process_date"
        }
      },
      "required": [
        "id",
        "process_date"
      ],
      "type": "object"
    },
    "ca_event_capital_gains_distribution": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "long_term_rate": {
              "description": "Long-term capital-gains payment per share, as a decimal string.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "short_term_rate": {
              "description": "Short-term capital-gains payment per share, as a decimal string.",
              "type": "string"
            },
            "symbol": {
              "description": "Ticker paying the distribution.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Capital-gains distribution payload delivered when\n`event_type == capital_gains_distribution_corporateaction_event`. Every\ndecimal field is emitted as a JSON string to preserve precision on the\nwire. At least one of `long_term_rate` / `short_term_rate` is present;\ncombined distributions carry both.\n"
    },
    "ca_event_cash_dividend": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "due_bill_off_date": {
              "description": "End of the due-bill period.",
              "format": "date",
              "type": "string"
            },
            "due_bill_on_date": {
              "description": "Start of the due-bill period.",
              "format": "date",
              "type": "string"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "foreign": {
              "description": "`true` if the issuer is not US-based.",
              "type": "boolean"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "rate": {
              "description": "Cash paid per share, as a decimal string.",
              "type": "string"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "special": {
              "description": "`true` if this is a one-off dividend outside the issuer's regular\ndistribution schedule.\n",
              "type": "boolean"
            },
            "sub_type": {
              "description": "Optional sub-classification of the dividend.",
              "enum": [
                "interest",
                "return_of_capital"
              ],
              "type": "string"
            },
            "symbol": {
              "description": "Ticker paying the dividend.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "rate",
            "special",
            "foreign",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Cash dividend payload delivered when\n`event_type == cash_dividend_corporateaction_event`. Corresponds to\n`cash_dividends` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_cash_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "acquiree_cusip": {
              "description": "CUSIP of the company being bought.",
              "type": "string"
            },
            "acquiree_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquiree_symbol": {
              "description": "Ticker being bought (will disappear after the merger).",
              "type": "string"
            },
            "acquirer_cusip": {
              "description": "Buyer's CUSIP.",
              "type": "string"
            },
            "acquirer_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquirer_symbol": {
              "description": "Buyer's ticker (the surviving company).",
              "type": "string"
            },
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "effective_date": {
              "$ref": "#/$defs/effective_date"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "rate": {
              "description": "Cash paid per share of the acquired company, as a decimal string.",
              "type": "string"
            }
          },
          "required": [
            "acquiree_symbol",
            "acquiree_cusip",
            "rate",
            "effective_date"
          ],
          "type": "object"
        }
      ],
      "description": "Cash merger payload delivered when\n`event_type == cash_merger_corporateaction_event`. Corresponds to\n`cash_mergers` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_equity_partial_call": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "dividend_rate": {
              "description": "Dividend rate associated with the called shares, as a decimal string.",
              "type": "string"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "lottery_date": {
              "description": "When the lottery drawing happens.",
              "format": "date",
              "type": "string"
            },
            "lottery_type": {
              "description": "How called shares were allocated among holders.",
              "enum": [
                "original",
                "supplemental"
              ],
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "price": {
              "description": "Price paid per called share, as a decimal string.",
              "type": "string"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "results_publication_date": {
              "description": "When the lottery results are published.",
              "format": "date",
              "type": "string"
            },
            "symbol": {
              "description": "Ticker being partially called.",
              "type": "string"
            }
          },
          "required": [
            "symbol"
          ],
          "type": "object"
        }
      ],
      "description": "Partial redemption of an equity issue where the issuer calls back only a\nfraction of outstanding shares -- typically allocated to holders via a\nlottery. Delivered when\n`event_type == equity_partial_call_corporateaction_event`. Corresponds to\n`partial_calls` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_forward_split": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "due_bill_redemption_date": {
              "$ref": "#/$defs/due_bill_redemption_date"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "new_rate": {
              "description": "Shares after the split, as a decimal string.",
              "type": "string"
            },
            "old_rate": {
              "description": "Shares before the split, as a decimal string.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "symbol": {
              "description": "Ticker being split.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "old_rate",
            "new_rate",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Forward stock split payload delivered when\n`event_type == forward_split_corporateaction_event`. Corresponds to\n`forward_splits` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_name_change": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "new_cusip": {
              "description": "CUSIP after the change.",
              "type": "string"
            },
            "new_isin": {
              "$ref": "#/$defs/isin"
            },
            "new_symbol": {
              "description": "Ticker after the change.",
              "type": "string"
            },
            "old_cusip": {
              "description": "CUSIP before the change.",
              "type": "string"
            },
            "old_isin": {
              "$ref": "#/$defs/isin"
            },
            "old_symbol": {
              "description": "Ticker before the change.",
              "type": "string"
            }
          },
          "required": [
            "old_symbol",
            "old_cusip",
            "new_symbol",
            "new_cusip"
          ],
          "type": "object"
        }
      ],
      "description": "Name/ticker change payload delivered when\n`event_type == name_change_corporateaction_event`. Corresponds to\n`name_changes` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response.\n"
    },
    "ca_event_redemption": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "rate": {
              "description": "Cash paid per share, as a decimal string.",
              "type": "string"
            },
            "symbol": {
              "description": "Ticker being redeemed.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "rate"
          ],
          "type": "object"
        }
      ],
      "description": "Full redemption payload delivered when\n`event_type == redemption_corporateaction_event`. Corresponds to\n`redemptions` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_reorganization": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "cash_rate": {
              "description": "Cash paid per source share, as a decimal string.",
              "type": "string"
            },
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the original security.",
              "type": "string"
            },
            "effective_date": {
              "$ref": "#/$defs/effective_date"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "stock_movements": {
              "description": "One entry per replacement security delivered to holders.",
              "items": {
                "$ref": "#/$defs/ca_event_reorganization_stock_movement"
              },
              "type": "array"
            },
            "symbol": {
              "description": "Ticker undergoing the reorganization.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "effective_date"
          ],
          "type": "object"
        }
      ],
      "description": "General-purpose corporate restructuring (e.g. Chapter 11 emergence) where\nexisting holders receive a mix of cash and/or one or more replacement\nsecurities. Each entry in `stock_movements` describes a separate\nshare-class distribution. Delivered when\n`event_type == reorganization_corporateaction_event`. Corresponds to\n`reorganizations` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_reorganization_stock_movement": {
      "additionalProperties": false,
      "description": "A single replacement-security leg of a\n[`ca_event_reorganization`](#/components/schemas/ca_event_reorganization)\npayload. All decimal fields are emitted as JSON strings to preserve\nprecision on the wire.\n",
      "properties": {
        "cusip": {
          "description": "Replacement CUSIP.",
          "type": "string"
        },
        "isin": {
          "$ref": "#/$defs/isin"
        },
        "new_rate": {
          "description": "Replacement shares delivered per `source_rate`, as a decimal string.",
          "type": "string"
        },
        "source_rate": {
          "description": "Source shares required for each `new_rate`, as a decimal string.",
          "type": "string"
        },
        "symbol": {
          "description": "Replacement ticker.",
          "type": "string"
        }
      },
      "required": [
        "symbol",
        "cusip",
        "new_rate",
        "source_rate"
      ],
      "type": "object"
    },
    "ca_event_reverse_split": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "new_cusip": {
              "description": "CUSIP after the split.",
              "type": "string"
            },
            "new_isin": {
              "$ref": "#/$defs/isin"
            },
            "new_rate": {
              "description": "Shares after the split, as a decimal string.",
              "type": "string"
            },
            "new_symbol": {
              "description": "Ticker after the split when the issuer also changes symbol (e.g. with\na \"D\" suffix). Omitted when the ticker doesn't change.\n",
              "type": "string"
            },
            "old_cusip": {
              "description": "CUSIP before the split.",
              "type": "string"
            },
            "old_isin": {
              "$ref": "#/$defs/isin"
            },
            "old_rate": {
              "description": "Shares before the split, as a decimal string.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "symbol": {
              "description": "Ticker being split.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "old_cusip",
            "new_cusip",
            "old_rate",
            "new_rate",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Reverse stock split payload delivered when\n`event_type == reverse_split_corporateaction_event`. Corresponds to\n`reverse_splits` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_rights_distribution": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "expiration_date": {
              "$ref": "#/$defs/expiration_date"
            },
            "new_cusip": {
              "description": "CUSIP of the new right.",
              "type": "string"
            },
            "new_isin": {
              "$ref": "#/$defs/isin"
            },
            "new_symbol": {
              "description": "Ticker of the new right/warrant.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "rate": {
              "description": "Rights given per share you own, as a decimal string.",
              "type": "string"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "source_cusip": {
              "description": "CUSIP of the underlying ticker.",
              "type": "string"
            },
            "source_isin": {
              "$ref": "#/$defs/isin"
            },
            "source_symbol": {
              "description": "Ticker whose holders receive the rights.",
              "type": "string"
            }
          },
          "required": [
            "source_symbol",
            "source_cusip",
            "new_symbol",
            "new_cusip",
            "rate",
            "ex_date",
            "payable_date"
          ],
          "type": "object"
        }
      ],
      "description": "Rights distribution payload delivered when\n`event_type == rights_distribution_corporateaction_event`. Corresponds to\n`rights_distributions` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_spin_off": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "due_bill_redemption_date": {
              "$ref": "#/$defs/due_bill_redemption_date"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "new_cusip": {
              "description": "CUSIP of the new spin-off company.",
              "type": "string"
            },
            "new_isin": {
              "$ref": "#/$defs/isin"
            },
            "new_rate": {
              "description": "New-company shares distributed per `source_rate` parent shares, as a decimal string.",
              "type": "string"
            },
            "new_symbol": {
              "description": "Ticker of the new spin-off company.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "source_cusip": {
              "description": "Parent CUSIP.",
              "type": "string"
            },
            "source_isin": {
              "$ref": "#/$defs/isin"
            },
            "source_rate": {
              "description": "Parent shares required per ratio unit, as a decimal string.",
              "type": "string"
            },
            "source_symbol": {
              "description": "Parent company's ticker.",
              "type": "string"
            }
          },
          "required": [
            "source_symbol",
            "source_cusip",
            "source_rate",
            "new_symbol",
            "new_cusip",
            "new_rate",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Spin-off payload delivered when\n`event_type == spin_off_corporateaction_event`. Corresponds to\n`spin_offs` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_stock_and_cash_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "acquiree_cusip": {
              "description": "CUSIP of the company being bought.",
              "type": "string"
            },
            "acquiree_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquiree_rate": {
              "description": "Bought-side ratio, as a decimal string.",
              "type": "string"
            },
            "acquiree_symbol": {
              "description": "Ticker being bought (will disappear).",
              "type": "string"
            },
            "acquirer_cusip": {
              "description": "Buyer's CUSIP.",
              "type": "string"
            },
            "acquirer_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquirer_rate": {
              "description": "Buyer shares given per unit ratio, as a decimal string.",
              "type": "string"
            },
            "acquirer_symbol": {
              "description": "Buyer's ticker (the surviving company).",
              "type": "string"
            },
            "cash_rate": {
              "description": "Extra cash paid per share of the acquired company, as a decimal string.",
              "type": "string"
            },
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "effective_date": {
              "$ref": "#/$defs/effective_date"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            }
          },
          "required": [
            "acquirer_symbol",
            "acquirer_cusip",
            "acquirer_rate",
            "acquiree_symbol",
            "acquiree_cusip",
            "acquiree_rate",
            "cash_rate",
            "effective_date"
          ],
          "type": "object"
        }
      ],
      "description": "Merger paying a mix of stock and cash. Delivered when\n`event_type == stock_and_cash_merger_corporateaction_event`. Corresponds\nto `stock_and_cash_mergers` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_stock_dividend": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "ex_date": {
              "$ref": "#/$defs/ex_date"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            },
            "rate": {
              "description": "Extra shares received per share held, as a decimal string.",
              "type": "string"
            },
            "record_date": {
              "$ref": "#/$defs/record_date"
            },
            "symbol": {
              "description": "Ticker paying the stock dividend.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip",
            "rate",
            "ex_date"
          ],
          "type": "object"
        }
      ],
      "description": "Stock dividend payload delivered when\n`event_type == stock_dividend_corporateaction_event`. Corresponds to\n`stock_dividends` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_stock_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "acquiree_cusip": {
              "description": "CUSIP of the company being bought.",
              "type": "string"
            },
            "acquiree_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquiree_rate": {
              "description": "Bought-side ratio, as a decimal string.",
              "type": "string"
            },
            "acquiree_symbol": {
              "description": "Ticker being bought (will disappear).",
              "type": "string"
            },
            "acquirer_cusip": {
              "description": "Buyer's CUSIP.",
              "type": "string"
            },
            "acquirer_isin": {
              "$ref": "#/$defs/isin"
            },
            "acquirer_rate": {
              "description": "Buyer-side ratio, as a decimal string.",
              "type": "string"
            },
            "acquirer_symbol": {
              "description": "Buyer's ticker (the surviving company).",
              "type": "string"
            },
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "effective_date": {
              "$ref": "#/$defs/effective_date"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            }
          },
          "required": [
            "acquirer_symbol",
            "acquirer_cusip",
            "acquirer_rate",
            "acquiree_symbol",
            "acquiree_cusip",
            "acquiree_rate",
            "effective_date"
          ],
          "type": "object"
        }
      ],
      "description": "All-stock merger payload delivered when\n`event_type == stock_merger_corporateaction_event`. Corresponds to\n`stock_mergers` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_unit_split": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "alternate_cusip": {
              "description": "CUSIP of the secondary leg.",
              "type": "string"
            },
            "alternate_isin": {
              "$ref": "#/$defs/isin"
            },
            "alternate_rate": {
              "description": "Secondary-leg shares delivered per unit, as a decimal string.",
              "type": "string"
            },
            "alternate_symbol": {
              "description": "Ticker of the secondary leg (usually a warrant).",
              "type": "string"
            },
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "effective_date": {
              "$ref": "#/$defs/effective_date"
            },
            "new_cusip": {
              "description": "CUSIP of the primary leg.",
              "type": "string"
            },
            "new_isin": {
              "$ref": "#/$defs/isin"
            },
            "new_rate": {
              "description": "Primary-leg shares delivered per unit, as a decimal string.",
              "type": "string"
            },
            "new_symbol": {
              "description": "Ticker of the primary leg (usually the common share).",
              "type": "string"
            },
            "old_cusip": {
              "description": "CUSIP of the unit.",
              "type": "string"
            },
            "old_isin": {
              "$ref": "#/$defs/isin"
            },
            "old_rate": {
              "description": "Units per ratio unit, as a decimal string.",
              "type": "string"
            },
            "old_symbol": {
              "description": "Ticker of the unit being split.",
              "type": "string"
            },
            "payable_date": {
              "$ref": "#/$defs/payable_date"
            }
          },
          "required": [
            "old_symbol",
            "old_cusip",
            "old_rate",
            "new_symbol",
            "new_cusip",
            "new_rate",
            "alternate_symbol",
            "alternate_cusip",
            "alternate_rate",
            "effective_date"
          ],
          "type": "object"
        }
      ],
      "description": "Unit split payload delivered when\n`event_type == unit_split_corporateaction_event`. Corresponds to\n`unit_splits` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response, but\nevery decimal field is emitted as a JSON string to preserve precision on\nthe wire.\n"
    },
    "ca_event_worthless_removal": {
      "allOf": [
        {
          "$ref": "#/$defs/ca_event_base"
        },
        {
          "properties": {
            "currency": {
              "$ref": "#/$defs/currency"
            },
            "cusip": {
              "description": "CUSIP of the security.",
              "type": "string"
            },
            "isin": {
              "$ref": "#/$defs/isin"
            },
            "symbol": {
              "description": "Ticker being removed.",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "cusip"
          ],
          "type": "object"
        }
      ],
      "description": "Worthless removal payload delivered when\n`event_type == worthless_removal_corporateaction_event`. Corresponds to\n`worthless_removals` on the REST\n[`GET /v1/corporate-actions`](#operation/CorporateActions) response.\n"
    },
    "ca_id": {
      "description": "The internal Alpaca identifier of the corporate action.",
      "format": "uuid",
      "type": "string"
    },
    "corporate_action_event_action": {
      "description": "Kind of mutation that produced this event on the upstream corporate actions\nstore:\n\n- `insert`: a new corporate action was created.\n- `update`: an existing corporate action was modified (e.g. a date or rate\n  correction). `ca.id` matches the original event.\n- `delete`: a previously published corporate action was removed. `ca.id`\n  matches the original event; subsequent events for the same id (if any)\n  will be new inserts.\n",
      "enum": [
        "insert",
        "update",
        "delete"
      ],
      "type": "string"
    },
    "corporate_action_event_base": {
      "description": "Common envelope fields shared by every variant of\n[`corporate_action_event`](#/components/schemas/corporate_action_event).\nThis schema is not meant to be used directly by clients -- it exists so each\nper-`event_type` `oneOf` branch can `allOf`-compose the envelope basics\n(`event_id`, `at`, `action`, `region`) alongside its narrowed `event_type` /\n`ca` pair. Keeping these in one place is what makes the envelope's\n`discriminator` play nicely with strict OpenAPI validators.\n",
      "properties": {
        "action": {
          "$ref": "#/$defs/corporate_action_event_action"
        },
        "at": {
          "description": "RFC-3339 timestamp when the streaming service emitted this event.",
          "format": "date-time",
          "type": "string"
        },
        "event_id": {
          "$ref": "#/$defs/event_id"
        },
        "region": {
          "$ref": "#/$defs/corporate_action_event_region"
        }
      },
      "required": [
        "event_id",
        "at",
        "action",
        "region"
      ],
      "type": "object"
    },
    "corporate_action_event_capital_gains_distribution": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_capital_gains_distribution"
            },
            "event_type": {
              "enum": [
                "capital_gains_distribution_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\ncapital_gains_distribution_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_cash_dividend": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_cash_dividend"
            },
            "event_type": {
              "enum": [
                "cash_dividend_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\ncash_dividend_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_cash_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_cash_merger"
            },
            "event_type": {
              "enum": [
                "cash_merger_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\ncash_merger_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_equity_partial_call": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_equity_partial_call"
            },
            "event_type": {
              "enum": [
                "equity_partial_call_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nequity_partial_call_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_forward_split": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_forward_split"
            },
            "event_type": {
              "enum": [
                "forward_split_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nforward_split_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_name_change": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_name_change"
            },
            "event_type": {
              "enum": [
                "name_change_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nname_change_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_redemption": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_redemption"
            },
            "event_type": {
              "enum": [
                "redemption_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nredemption_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_region": {
      "description": "Envelope-level classification derived from `metadata.global` on the upstream\ncorporate-action record. This is the only field the SSE `region` filter\ninspects on each event.\n\n- `us`: US-listed / US-regulated corporate action.\n- `non_us`: everything else.\n",
      "enum": [
        "us",
        "non_us"
      ],
      "type": "string"
    },
    "corporate_action_event_reorganization": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_reorganization"
            },
            "event_type": {
              "enum": [
                "reorganization_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nreorganization_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_reverse_split": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_reverse_split"
            },
            "event_type": {
              "enum": [
                "reverse_split_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nreverse_split_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_rights_distribution": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_rights_distribution"
            },
            "event_type": {
              "enum": [
                "rights_distribution_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nrights_distribution_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_spin_off": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_spin_off"
            },
            "event_type": {
              "enum": [
                "spin_off_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nspin_off_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_stock_and_cash_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_stock_and_cash_merger"
            },
            "event_type": {
              "enum": [
                "stock_and_cash_merger_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nstock_and_cash_merger_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_stock_dividend": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_stock_dividend"
            },
            "event_type": {
              "enum": [
                "stock_dividend_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nstock_dividend_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_stock_merger": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_stock_merger"
            },
            "event_type": {
              "enum": [
                "stock_merger_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nstock_merger_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_unit_split": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_unit_split"
            },
            "event_type": {
              "enum": [
                "unit_split_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nunit_split_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "corporate_action_event_worthless_removal": {
      "allOf": [
        {
          "$ref": "#/$defs/corporate_action_event_base"
        },
        {
          "properties": {
            "ca": {
              "$ref": "#/$defs/ca_event_worthless_removal"
            },
            "event_type": {
              "enum": [
                "worthless_removal_corporateaction_event"
              ],
              "type": "string"
            }
          },
          "required": [
            "event_type",
            "ca"
          ],
          "type": "object"
        }
      ],
      "description": "`corporate_action_event` envelope specialized to `event_type ==\nworthless_removal_corporateaction_event`. Emitted through\n[Corporate Actions Events Stream](#operation/SubscribeToCorporateActionsEventsSSE).\n"
    },
    "currency": {
      "description": "The ISO 4217 currency code associated with the corporate action.\nEmpty value can mean USD, non-applicable (e.g. for name changes) or unknown\n(can change later to a valid currency).\n",
      "type": "string"
    },
    "due_bill_redemption_date": {
      "description": "The date when due bill obligations are redeemed.",
      "format": "date",
      "type": "string"
    },
    "effective_date": {
      "description": "The effective date marks the cutoff point for shareholders to be credited.",
      "format": "date",
      "type": "string"
    },
    "event_id": {
      "description": "Lexically sortable, monotonically increasing 26-character\n[ULID](https://github.com/ulid/spec) (Crockford Base32, uppercase) that\nidentifies a single SSE emission. Unique per message -- an `update` or\n`delete` for the same underlying corporate action carries a fresh\n`event_id`. Because ULIDs sort in emission order, they can be used as\nresume cursors via `since_id`, `until_id`, or the standard `Last-Event-Id`\nreconnect header.\n",
      "format": "ulid",
      "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
      "type": "string"
    },
    "ex_date": {
      "description": "The ex-date marks the cutoff point for shareholders to be credited.",
      "format": "date",
      "type": "string"
    },
    "expiration_date": {
      "format": "date",
      "type": "string"
    },
    "isin": {
      "description": "International Securities Identification Number (ISIN) as defined by ISO 6166.\nMay be empty for US corporate actions.\n",
      "type": "string"
    },
    "payable_date": {
      "description": "The date when the corporate action benefit is paid or distributed.",
      "format": "date",
      "type": "string"
    },
    "process_date": {
      "description": "The date when the corporate action is processed by Alpaca.",
      "format": "date",
      "type": "string"
    },
    "record_date": {
      "description": "The date shareholders must own shares to receive the benefit.",
      "format": "date",
      "type": "string"
    }
  }
}