# CompressedOrder

The message describing an orders that have been compressed into a single order

## Example Usage

```typescript
import { CompressedOrder } from "@apexfintechsolutions/ascend-sdk/models/components";

let value: CompressedOrder = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                             | Type                                                                                                                                                                                                                                                                                                                                              | Required                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                       | Example                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assetId`                                                                                                                                                                                                                                                                                                                                         | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Apex Asset ID for this asset. This will not be returned in the initial CreateOrder response and will be available after an order completes validation. If the provided identifier does not match any Apex asset available for trading, an OrderRejectReason of "UNKNOWN_SECURITY" will be returned and the asset_id will not be set.              | 22091                                                                                                                                                                                                                                                                                                                                             |
| `assetType`                                                                                                                                                                                                                                                                                                                                       | [components.CompressedOrderAssetType](../../models/components/compressedorderassettype.md)                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The type of the asset in this order                                                                                                                                                                                                                                                                                                               | EQUITY                                                                                                                                                                                                                                                                                                                                            |
| `averagePriceAccountId`                                                                                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The identifier of the account transacting this order                                                                                                                                                                                                                                                                                              | 01HBRQ5BW6ZAY4BNWP4GWRD80X                                                                                                                                                                                                                                                                                                                        |
| `averagePrices`                                                                                                                                                                                                                                                                                                                                   | [components.BasketTradingExecutedPrice](../../models/components/baskettradingexecutedprice.md)[]                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The average prices, as weighted averages, across all executions in this order. Will be absent if an order has no executions.<br/><br/> When asset_type = EQUITY, there will be at most one value present, with a type of PRICE_PER_UNIT. This will have up to 4 decimal places for USD amounts less than $1, and a maximum of two for larger USD amounts. | [<br/>{<br/>"price": {<br/>"value": "99.20"<br/>},<br/>"type": "PRICE_PER_UNIT"<br/>}<br/>]                                                                                                                                                                                                                                                       |
| `compressedOrderId`                                                                                                                                                                                                                                                                                                                               | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | System generated unique id for the compressed order.                                                                                                                                                                                                                                                                                              | ebb0c9b5-2c74-45c9-a4ab-40596b778706                                                                                                                                                                                                                                                                                                              |
| `createTime`                                                                                                                                                                                                                                                                                                                                      | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Time of the order creation                                                                                                                                                                                                                                                                                                                        | 2023-09-21T16:55:27.580Z                                                                                                                                                                                                                                                                                                                          |
| `cumulativeNotionalValue`                                                                                                                                                                                                                                                                                                                         | [components.CompressedOrderCumulativeNotionalValue](../../models/components/compressedordercumulativenotionalvalue.md)                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The product of order quantity & price, summed across all fills, reported in the currency specified in the order. (This will be rounded to 2 decimal places for USD currencies). Will be absent if an order has no fill information.                                                                                                               | {<br/>"value": "120.68"<br/>}                                                                                                                                                                                                                                                                                                                     |
| `currencyCode`                                                                                                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Defaults to "USD". Only "USD" is supported. Full list of currency codes is defined at: https://en.wikipedia.org/wiki/ISO_4217                                                                                                                                                                                                                     | USD                                                                                                                                                                                                                                                                                                                                               |
| `executions`                                                                                                                                                                                                                                                                                                                                      | [components.BasketTradingExecutions](../../models/components/baskettradingexecutions.md)[]                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The execution-level details that compose this order                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                   |
| `filledQuantity`                                                                                                                                                                                                                                                                                                                                  | [components.CompressedOrderFilledQuantity](../../models/components/compressedorderfilledquantity.md)                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The summed quantity value across all fills in this order, up to a maximum of 5 decimal places. Will be absent if an order has no fill information.                                                                                                                                                                                                | {<br/>"value": "10.00"<br/>}                                                                                                                                                                                                                                                                                                                      |
| `identifier`                                                                                                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Identifier of the asset (of the type specified in `identifier_type`).                                                                                                                                                                                                                                                                             | SBUX                                                                                                                                                                                                                                                                                                                                              |
| `identifierType`                                                                                                                                                                                                                                                                                                                                  | [components.CompressedOrderIdentifierType](../../models/components/compressedorderidentifiertype.md)                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The identifier type of the asset being ordered. For Equities: only SYMBOL is supported                                                                                                                                                                                                                                                            | SYMBOL                                                                                                                                                                                                                                                                                                                                            |
| `lastUpdateTime`                                                                                                                                                                                                                                                                                                                                  | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Time of the last order update                                                                                                                                                                                                                                                                                                                     | 2023-09-21T16:55:27.580Z                                                                                                                                                                                                                                                                                                                          |
| `name`                                                                                                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | System generated name of the order.                                                                                                                                                                                                                                                                                                               | correspondents/01HPMZZM6RKMVZA1JQ63RQKJRP/baskets/fffd326-72fa-4d2b-bd1f-45384fe5d521/compressedOrders/ebb0c9b5-2c74-45c9-a4ab-40596b778706                                                                                                                                                                                                       |
| `notionalValue`                                                                                                                                                                                                                                                                                                                                   | [components.CompressedOrderNotionalValue](../../models/components/compressedordernotionalvalue.md)                                                                                                                                                                                                                                                | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Notional quantity of the order, measured in USD. Maximum 2 decimal place precision. Either a quantity or notional_value MUST be specified (but not both). For Equities: currently not supported yet For Mutual Funds: Only supported for BUY orders. The order will be transacted at the full notional amount specified.                          | {<br/>"value": "100.54"<br/>}                                                                                                                                                                                                                                                                                                                     |
| `orderRejectedReason`                                                                                                                                                                                                                                                                                                                             | [components.CompressedOrderOrderRejectedReason](../../models/components/compressedorderorderrejectedreason.md)                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | When an order has the REJECTED status, this will be populated with a system code describing the rejection.                                                                                                                                                                                                                                        | BELOW_NOTIONAL_MINIMUM                                                                                                                                                                                                                                                                                                                            |
| `orderStatus`                                                                                                                                                                                                                                                                                                                                     | [components.CompressedOrderOrderStatus](../../models/components/compressedorderorderstatus.md)                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The processing status of the order                                                                                                                                                                                                                                                                                                                | FILLED                                                                                                                                                                                                                                                                                                                                            |
| `orderType`                                                                                                                                                                                                                                                                                                                                       | [components.CompressedOrderOrderType](../../models/components/compressedorderordertype.md)                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The execution type of this order. Only MARKET is supported.                                                                                                                                                                                                                                                                                       | MARKET                                                                                                                                                                                                                                                                                                                                            |
| `quantity`                                                                                                                                                                                                                                                                                                                                        | [components.CompressedOrderQuantity](../../models/components/compressedorderquantity.md)                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Numeric quantity of the order. Either a quantity or notional_value MUST be specified (but not both). For Equities: Represents the number of shares, must be greater than zero and may not exceed 5 decimal places. For Mutual Funds: Only supported for SELL orders. Represents the number of shares, up to a maximum of 3 decimal places.        | {<br/>"value": "20.55219"<br/>}                                                                                                                                                                                                                                                                                                                   |
| `side`                                                                                                                                                                                                                                                                                                                                            | [components.CompressedOrderSide](../../models/components/compressedorderside.md)                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | The side of this order.                                                                                                                                                                                                                                                                                                                           | BUY                                                                                                                                                                                                                                                                                                                                               |
| `specialReportingInstructions`                                                                                                                                                                                                                                                                                                                    | [components.CompressedOrderSpecialReportingInstructions](../../models/components/compressedorderspecialreportinginstructions.md)[]                                                                                                                                                                                                                | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Special Reporting Instructions to be applied to this order. Can include multiple Instructions.                                                                                                                                                                                                                                                    | [<br/>"UNSOLICITED",<br/>"ROUND_UP"<br/>]                                                                                                                                                                                                                                                                                                         |
| `timeInForce`                                                                                                                                                                                                                                                                                                                                     | [components.CompressedOrderTimeInForce](../../models/components/compressedordertimeinforce.md)                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                | Must be the value "DAY". Regulatory requirements dictate that the system capture the intended time_in_force, which is why this a mandatory field.                                                                                                                                                                                                 | DAY                                                                                                                                                                                                                                                                                                                                               |