{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-trade-update-event-v2-schema.json",
  "title": "TradeUpdateEvent",
  "description": "Represents an update to an order/trade, sent over the events streaming api.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-us-broker-api-openapi.yml#/components/schemas/TradeUpdateEventV2",
  "properties": {
    "account_id": {
      "description": "Account UUID",
      "format": "uuid",
      "minLength": 1,
      "type": "string"
    },
    "at": {
      "description": "Timestamp of event",
      "format": "date-time",
      "minLength": 1,
      "type": "string"
    },
    "event": {
      "$ref": "#/$defs/TradeUpdateEventType"
    },
    "event_id": {
      "description": "lexically sortable, monotonically increasing character array",
      "format": "ulid",
      "type": "string"
    },
    "execution_id": {
      "description": "Corresponding execution of an order. If an order gets filled over two executions (a partial_fill for example), you will receive two events with different IDs.\nNot present for `MultilegOptions`\n",
      "format": "uui",
      "type": "string"
    },
    "legs": {
      "description": "Only present when event is for `MultilegOptions`. Represents filled qty/price of legs.\n",
      "items": {
        "$ref": "#/$defs/TradeUpdateEventV2Leg"
      },
      "type": "array"
    },
    "order": {
      "$ref": "#/$defs/Order"
    },
    "position_qty": {
      "description": "Only present when event is either `fill` or `partial_fill` other than `MultilegOptions`. The size of your total position, after this fill event, in shares. Positive for long positions, negative for short positions.\n",
      "type": "string"
    },
    "position_qtys": {
      "description": "Only present when event is either `fill` or `partial_fill` for `MultilegOptions`. The size of your total position, after this fill event, in shares. Positive for long positions, negative for short positions.\n",
      "type": "string"
    },
    "previous_execution_id": {
      "description": "ID of the original execution that was busted or corrected (present only in trade_bust and trade_correct events).",
      "format": "uuid",
      "type": "string"
    },
    "price": {
      "description": "Only present when event is either `fill` or `partial_fill`. The average price per share at which the order was filled.",
      "type": "string"
    },
    "qty": {
      "description": "Only present when event is either `fill`, `partial_fill`, `trade_bust` and `trade_correct`. The amount of shares this Trade order was for. <br /> For `trade_bust` events, the qty field may be negative, representing a reversal of the original quantity.",
      "type": "string"
    },
    "reason": {
      "description": "Machine-readable code that explains **why** the event occurred. Only present when a reason applies; omitted from routine lifecycle events such as `new`, `fill`, and `partial_fill`.\n\nKnown values:\n\n| Value | Event(s) | Meaning |\n| --- | --- | --- |\n| `CORPORATE_ACTION` | `canceled` | Alpaca canceled the order internally because the underlying is scheduled for a mandatory corporate action other than a cash dividend (e.g. reverse split, symbol/CUSIP change, merger, liquidation). Emitted by the overnight-session lifecycle and, where enabled by Alpaca, the daytime GTC corporate-action sweep. Not emitted when the cancel is routed to the upstream venue instead (e.g. day-session, `extended_hours=false`, agency- or mixed-capacity orders); those `canceled` events carry the venue's own text in `reason` if any. |\n| `TOO_LATE_TO_CANCEL` | `order_cancel_rejected`, `order_replace_rejected` | The cancel or replace request arrived after the order had already reached a terminal state (typically `filled`). |\n| `TRADE_BUST` | `trade_bust` | Alpaca operations replayed or synthesized a bust of a previously reported execution. Busts that originate from the upstream venue surface the venue's own text in `reason` (or omit it entirely), so consumers should not rely on `TRADE_BUST` alone to identify all busts — key on the `event` field (`trade_bust`) for that. |\n\nFree-form strings may also appear in `reason`. In particular, `canceled`, `trade_bust`, and `trade_correct` events originating from the upstream venue carry the venue's own text field (when the venue provides one) rather than an Alpaca-defined code. Consumers should tolerate unknown values and, where they need to distinguish cases, key on `event` first and use `reason` as a secondary hint.\n",
      "type": [
        "string",
        "null"
      ]
    },
    "settle_date": {
      "description": "Settlement date of the trade in format `YYYY-MM-DD` for `fill` and `partial_fill` events",
      "format": "date",
      "type": "string"
    },
    "swap_rate": {
      "description": "Only present for `local currency trading account` or `crypto asset trade` when event is either `fill` or `partial_fill`. The swap rate at which the current trade was filled.",
      "type": "string"
    },
    "timestamp": {
      "description": "Has various different meanings depending on the value of `event`, please see the [Trading Events](https://alpaca.markets/docs/api-references/broker-api/events/#trade-events)\nEnum in the documentation or the TradeUpdateEventType model for more details on when it means different things.\n",
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "AssetClass": {
      "description": "This represents the category to which the asset belongs to. It serves to identify the nature of the financial instrument, with options including \"us_equity\" for U.S. equities, \"us_option\" for U.S. options, \"crypto\" for cryptocurrencies, and \"ipo\" for IPO indications of interest. This `asset_class: ipo` value is distinct from the assets API `attributes: [\"ipo\"]` flag.",
      "enum": [
        "us_equity",
        "us_option",
        "us_index",
        "crypto",
        "crypto_perp",
        "ipo"
      ],
      "type": "string"
    },
    "CommissionType": {
      "default": "notional",
      "description": "An enum to select how to interpret the value provided in the commission field.\n\n- notional:\nCharge commission on a per order basis. (When the `commission_type` field is omitted from the order request, this is used as the default).\n\n- qty:\nCharge commission on a per qty/contract basis, pro rated.\n\n- bps:\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\nCommission value in bps can have up to two decimal places.",
      "enum": [
        "notional",
        "qty",
        "bps"
      ],
      "title": "CommissionType",
      "type": "string"
    },
    "Order": {
      "properties": {
        "asset_class": {
          "$ref": "#/$defs/AssetClass"
        },
        "asset_id": {
          "description": "The asset ID (For options this represents the option contract ID)",
          "format": "uuid",
          "type": "string"
        },
        "cancel_requested_at": {
          "description": "Time when cancellation or bust was requested (if applicable)",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "canceled_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "client_order_id": {
          "description": "Client unique order ID",
          "maxLength": 128,
          "type": "string"
        },
        "commission": {
          "description": "The dollar value commission for this order.",
          "format": "decimal",
          "type": "string"
        },
        "commission_bps": {
          "deprecated": true,
          "description": "**deprecated**: Please use the commission_type = bps instead and set the desired bps value in the `commission` field.\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\n",
          "format": "decimal",
          "type": "string"
        },
        "commission_type": {
          "$ref": "#/$defs/CommissionType"
        },
        "created_at": {
          "description": "Time when order was entered",
          "format": "date-time",
          "type": "string"
        },
        "expired_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "extended_hours": {
          "type": "boolean"
        },
        "failed_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_at": {
          "description": "Time the order was filled. Can be null if not filled",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_avg_price": {
          "description": "Filled average price. Can be 0 until order is processed in case order is passed outside of market hours",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_qty": {
          "description": "Filled quantity",
          "format": "decimal",
          "type": "string"
        },
        "group_id": {
          "description": "Opaque identifier shared by every order in the same `bracket`, `oto`, or `oco` order, including its legs and any replacement orders. Use it to associate related orders received from the `trade_updates` stream, where `legs` is not populated. Omitted for other orders.",
          "format": "uuid",
          "type": "string"
        },
        "group_role": {
          "$ref": "#/$defs/OrderGroupRole"
        },
        "hwm": {
          "description": "The highest (lowest) market price seen since the trailing stop order was submitted.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Order ID generated by Alpaca",
          "format": "uuid",
          "type": "string"
        },
        "legs": {
          "description": "When querying non-simple order_class orders in a nested style, an array of Order entities associated with this order. Otherwise, null.",
          "items": {
            "$ref": "#/$defs/OrderLeg"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "limit_price": {
          "description": "Limit price",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "notional": {
          "description": "Ordered notional amount. If entered, qty will be null. Can take up to 2 decimal points.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "order_class": {
          "$ref": "#/$defs/OrderClass"
        },
        "order_type": {
          "$ref": "#/$defs/OrderType"
        },
        "position_intent": {
          "$ref": "#/$defs/PositionIntent"
        },
        "qty": {
          "description": "Ordered quantity. If entered, notional will be null. Can take up to 2 decimal points.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "replaced_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "replaced_by": {
          "description": "The order ID that this order was replaced by. (Can be null)",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "replaces": {
          "description": "The order ID that this order replaces. (Can be null)",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "settlement_currency": {
          "description": "Settlement currency of the order. Omitted when the order has none.",
          "type": "string"
        },
        "side": {
          "$ref": "#/$defs/OrderSide"
        },
        "status": {
          "$ref": "#/$defs/OrderStatus"
        },
        "stop_price": {
          "description": "Stop price",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "submitted_at": {
          "description": "Time the order was submitted for execution or, if not yet submitted the created_at time. Because orders are submitted for execution asynchronous to database updates, at times this may be after the created_at time.",
          "format": "date-time",
          "type": "string"
        },
        "swap_fee_bps": {
          "description": "Fee in basis points on top swap rate charged by the correspondent on every order",
          "type": "string"
        },
        "swap_rate": {
          "description": "Swap rate is the exchange rate (without mark-up) used to convert the price into local currency or crypto asset",
          "type": "string"
        },
        "symbol": {
          "description": "The asset symbol",
          "type": "string"
        },
        "time_in_force": {
          "$ref": "#/$defs/TimeInForce"
        },
        "trail_percent": {
          "description": "The percent value away from the high water mark for trailing stop orders.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "trail_price": {
          "description": "The dollar value away from the high water mark for trailing stop orders.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "$ref": "#/$defs/OrderType"
        },
        "updated_at": {
          "description": "Time of most recent change to the order",
          "format": "date-time",
          "type": "string"
        },
        "usd": {
          "description": "Nested object to encompass the USD equivalent fields for the local currency fields",
          "type": "object"
        }
      },
      "required": [
        "id",
        "symbol"
      ],
      "type": "object"
    },
    "OrderClass": {
      "description": "The order classes supported by Alpaca vary based on the order's security type. The following provides a comprehensive breakdown of the supported order classes for each category:\n  - Equity trading: simple (or \"\"), oco, oto, bracket.\n  - Options trading:\n    - simple (or \"\")\n    - mleg (required for multi-leg complex option strategies)\n  - Crypto trading: simple (or \"\").",
      "enum": [
        "simple",
        "bracket",
        "oco",
        "oto",
        "mleg",
        ""
      ],
      "type": "string"
    },
    "OrderGroupRole": {
      "description": "The role of this order within its `bracket`, `oto`, or `oco` order, identified by `group_id`.\n- `entry`: The entry order of a `bracket` or `oto` order.\n- `take_profit`: The take-profit limit order. For an `oco` order, this is the top-level order.\n- `stop_loss`: The stop-loss stop or stop-limit order.\n\nOmitted whenever `group_id` is omitted.",
      "enum": [
        "entry",
        "take_profit",
        "stop_loss"
      ],
      "title": "OrderGroupRole",
      "type": "string"
    },
    "OrderLeg": {
      "properties": {
        "asset_class": {
          "$ref": "#/$defs/AssetClass"
        },
        "asset_id": {
          "description": "The asset ID (For options this represents the option contract ID)",
          "format": "uuid",
          "type": "string"
        },
        "canceled_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "client_order_id": {
          "description": "Client unique order ID",
          "maxLength": 128,
          "type": "string"
        },
        "commission": {
          "description": "The dollar value commission you want to charge the end user.",
          "format": "decimal",
          "type": "string"
        },
        "commission_bps": {
          "deprecated": true,
          "description": "**deprecated**: Please use the commission_type = bps instead and set the desired bps value in the `commission` field.\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\n",
          "format": "decimal",
          "type": "string"
        },
        "commission_type": {
          "$ref": "#/$defs/CommissionType"
        },
        "created_at": {
          "description": "Time when order was entered",
          "format": "date-time",
          "type": "string"
        },
        "expired_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "extended_hours": {
          "type": "boolean"
        },
        "failed_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_at": {
          "description": "Time the order was filled. Can be null if not filled",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_avg_price": {
          "description": "Filled average price. Can be 0 until order is processed in case order is passed outside of market hours",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "filled_qty": {
          "description": "Filled quantity",
          "format": "decimal",
          "type": "string"
        },
        "group_id": {
          "description": "Opaque identifier shared by every order in the same `bracket`, `oto`, or `oco` order, including its legs and any replacement orders. Use it to associate related orders received from the `trade_updates` stream, where `legs` is not populated. Omitted for other orders.",
          "format": "uuid",
          "type": "string"
        },
        "group_role": {
          "$ref": "#/$defs/OrderGroupRole"
        },
        "hwm": {
          "description": "The highest (lowest) market price seen since the trailing stop order was submitted.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Order ID generated by Alpaca",
          "format": "uuid",
          "type": "string"
        },
        "legs": {
          "description": "Always null for an order leg; legs are not nested beyond one level. An empty array is accepted for generated-client compatibility.",
          "items": {
            "type": "object"
          },
          "maxItems": 0,
          "type": [
            "array",
            "null"
          ]
        },
        "limit_price": {
          "description": "Limit price",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "notional": {
          "description": "Ordered notional amount. If entered, qty will be null. Can take up to 2 decimal points.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "order_class": {
          "$ref": "#/$defs/OrderClass"
        },
        "order_type": {
          "$ref": "#/$defs/OrderType"
        },
        "position_intent": {
          "$ref": "#/$defs/PositionIntent"
        },
        "qty": {
          "description": "Ordered quantity. If entered, notional will be null. Can take up to 2 decimal points.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "replaced_at": {
          "description": "Can be null",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "replaced_by": {
          "description": "The order ID that this order was replaced by. (Can be null)",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "replaces": {
          "description": "The order ID that this order replaces. (Can be null)",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "settlement_currency": {
          "description": "Settlement currency of the order. Omitted when the order has none.",
          "type": "string"
        },
        "side": {
          "$ref": "#/$defs/OrderSide"
        },
        "status": {
          "$ref": "#/$defs/OrderStatus"
        },
        "stop_price": {
          "description": "Stop price",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "submitted_at": {
          "description": "Time the order was submitted for execution or, if not yet submitted the created_at time. Because orders are submitted for execution asynchronous to database updates, at times this may be after the created_at time.",
          "format": "date-time",
          "type": "string"
        },
        "swap_fee_bps": {
          "description": "Fee in basis points on top swap rate charged by the correspondent on every order",
          "type": "string"
        },
        "swap_rate": {
          "description": "Swap rate is the exchange rate (without mark-up) used to convert the price into local currency or crypto asset",
          "type": "string"
        },
        "symbol": {
          "description": "The asset symbol",
          "type": "string"
        },
        "time_in_force": {
          "$ref": "#/$defs/TimeInForce"
        },
        "trail_percent": {
          "description": "The percent value away from the high water mark for trailing stop orders.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "trail_price": {
          "description": "The dollar value away from the high water mark for trailing stop orders.",
          "format": "decimal",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "$ref": "#/$defs/OrderType"
        },
        "updated_at": {
          "description": "Time of most recent change to the order",
          "format": "date-time",
          "type": "string"
        },
        "usd": {
          "description": "Nested object to encompass the USD equivalent fields for the local currency fields",
          "type": "object"
        }
      },
      "required": [
        "id",
        "symbol"
      ],
      "type": "object"
    },
    "OrderSide": {
      "description": "Represents what side of the transaction an order was on. Required for all order classes except for `mleg`.",
      "enum": [
        "buy",
        "sell"
      ],
      "type": "string"
    },
    "OrderStatus": {
      "enum": [
        "new",
        "partially_filled",
        "filled",
        "done_for_day",
        "canceled",
        "expired",
        "replaced",
        "pending_cancel",
        "pending_replace",
        "accepted",
        "pending_new",
        "accepted_for_bidding",
        "stopped",
        "rejected",
        "suspended",
        "calculated"
      ],
      "type": "string"
    },
    "OrderType": {
      "description": "The order types supported by Alpaca vary based on the order's security type. The following provides a comprehensive breakdown of the supported order types for each category:\n - Equity trading: market, limit, stop, stop_limit, trailing_stop.\n - Options trading: market, limit, stop, stop_limit.\n - Options Multileg trading: market, limit.\n - Crypto trading: market, limit, stop_limit.",
      "enum": [
        "market",
        "limit",
        "stop",
        "stop_limit",
        "trailing_stop"
      ],
      "title": "OrderType",
      "type": "string"
    },
    "PositionIntent": {
      "description": "Represents the desired position strategy.",
      "enum": [
        "buy_to_open",
        "buy_to_close",
        "sell_to_open",
        "sell_to_close"
      ],
      "title": "PositionIntent",
      "type": "string"
    },
    "TimeInForce": {
      "description": "The Time-In-Force values supported by Alpaca vary based on the order's security type. Here is a breakdown of the supported TIFs for each specific security type:\n- Equity trading: day, gtc, opg, cls, ioc, fok.\n- Options trading: day, gtc.\n- Crypto trading: gtc, ioc.\n\nBelow are the descriptions of each TIF:\n- day:\n  A day order is eligible for execution only on the day it is live. By default, the order is only valid during Regular Trading Hours (9:30am - 4:00pm ET). If unfilled after the closing auction, it is automatically canceled. If submitted after the close, it is queued and submitted the following trading day. However, if marked as eligible for extended hours, the order can also execute during supported extended hours.\n\n- gtc:\n  The order is good until canceled. Non-marketable GTC limit orders are subject to price adjustments to offset corporate actions affecting the issue. We do not currently support Do Not Reduce (DNR) orders to opt out of such price adjustments.\n\n- opg:\n  Use this TIF with a market/limit order type to submit \"market on open\" (MOO) and \"limit on open\" (LOO) orders. This order is eligible to execute only in the market opening auction. Any unfilled orders after the open will be cancelled. OPG orders submitted after 9:28am but before 7:00pm ET will be rejected. OPG orders submitted after 7:00pm will be queued and routed to the following day's opening auction. On open/on close orders are routed to the primary exchange. Such orders do not necessarily execute exactly at 9:30am / 4:00pm ET but execute per the exchange's auction rules.\n\n- cls:\n  Use this TIF with a market/limit order type to submit \"market on close\" (MOC) and \"limit on close\" (LOC) orders. This order is eligible to execute only in the market closing auction. Any unfilled orders after the close will be cancelled. CLS orders submitted after 3:50pm but before 7:00pm ET will be rejected. CLS orders submitted after 7:00pm will be queued and routed to the following day's closing auction.\n\n- ioc:\n  An Immediate Or Cancel (IOC) order requires all or part of the order to be executed immediately. Any unfilled portion of the order is canceled. Most market makers who receive IOC orders will attempt to fill the order on a principal basis only, and cancel any unfilled balance. On occasion, this can result in the entire order being cancelled if the market maker does not have any existing inventory of the security in question.\n\n- fok:\n  A Fill or Kill (FOK) order is only executed if the entire order quantity can be filled, otherwise the order is canceled.",
      "enum": [
        "day",
        "gtc",
        "opg",
        "cls",
        "ioc",
        "fok"
      ],
      "title": "TimeInForce",
      "type": "string"
    },
    "TradeUpdateEventType": {
      "description": "**Common events**\n\nThese are the events that are the expected results of actions you may have taken by sending API requests.\n\nThe meaning of the `timestamp` field changes for each type; the meanings have been specified here for which types the\ntimestamp field will be present.\n\n- `accepted`: Sent when an order is received and accepted by Alpaca.\n- `new`: Sent when an order has been routed to exchanges for execution.\n- `fill`: Sent when your order has been completely filled.\n  - `timestamp`: The time at which the order was filled.\n- `partial_fill`: Sent when a number of shares less than the total remaining quantity on your order has been filled.\n  - `timestamp`: The time at which the shares were filled.\n- `canceled`: Sent when the order transitions to the `canceled` state. This can be triggered by a user-submitted cancel request, by Alpaca as part of automated processing (e.g. corporate-action sweeps, aged-GTC expiration, overnight-session lifecycle), or by an upstream execution venue. When Alpaca populates a machine-readable cause, it is exposed on the top-level `reason` field — see the `reason` property on `TradeUpdateEventV2` for known values (e.g. `CORPORATE_ACTION`).\n  - `timestamp`: The time at which the order was canceled.\n- `expired`: Sent when an order has reached the end of its lifespan, as determined by the order's time in force value.\n  - `timestamp`: The time at which the order expired.\n- `done_for_day`: Sent when the order is done executing for the day, and will not receive further updates until the next trading day.\n- `replaced`: Sent when your requested replacement of an order is processed.\n  - `timestamp`: The time at which the order was replaced.\n\n**Rarer events**\n\nThese are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur.\n\n- `rejected`: Sent when your order has been rejected.\n  - `timestamp`: The time at which the rejection occurred.\n- `pending_new`: Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution.\n- `stopped`: Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred.\n- `pending_cancel`: Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state.\n- `pending_replace`: Sent when the order is awaiting replacement.\n- `calculated`: Sent when the order has been completed for the day - it is either `filled` or `done_for_day` - but remaining settlement calculations are still pending.\n- `suspended`: Sent when the order has been suspended and is not eligible for trading.\n- `order_replace_rejected`: Sent when the order replace has been rejected.\n- `order_cancel_rejected`: Sent when the order cancel has been rejected.\n- `trade_bust`: Sent when a previously reported execution has been canceled (\"busted\") by the upstream exchange.\n- `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported.\n- `restated`: Sent when the order is manually modified.\n",
      "enum": [
        "new",
        "fill",
        "partial_fill",
        "canceled",
        "expired",
        "done_for_day",
        "replaced",
        "rejected",
        "pending_new",
        "accepted",
        "stopped",
        "pending_cancel",
        "pending_replace",
        "calculated",
        "suspended",
        "order_replace_rejected",
        "order_cancel_rejected",
        "trade_bust",
        "trade_correct"
      ],
      "type": "string"
    },
    "TradeUpdateEventV2Leg": {
      "description": "Represents filled qty/price of legs.",
      "properties": {
        "execution_id": {
          "description": "Corresponding execution of an order. If an order gets filled over two executions (a partial_fill for example), you will receive two events with different IDs.",
          "format": "uuid",
          "type": "string"
        },
        "order_id": {
          "description": "Order UUID",
          "format": "uuid",
          "minLength": 1,
          "type": "string"
        },
        "price": {
          "description": "The average price per share for this event.",
          "type": "string"
        },
        "qty": {
          "description": "The amount of shares filled for this event",
          "type": "string"
        },
        "symbol": {
          "description": "Symbol of an asset",
          "type": "string"
        },
        "timestamp": {
          "description": "Timestamp of this event leg\n",
          "format": "date-time",
          "type": "string"
        }
      },
      "title": "TradeUpdateEventV2Leg",
      "type": "object"
    }
  }
}