# OptionOrder

The message describing an option order

## Example Usage

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

let value: OptionOrder = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Required                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The identifier of the account transacting this option order                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | 01HBRQ5BW6ZAY4BNWP4GWRD80X                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `brokerCapacity`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [components.OptionOrderBrokerCapacity](../../models/components/optionorderbrokercapacity.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The capacity in which the broker is acting for this option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | AGENCY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `cancelReason`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Used to explain why an option order is canceled                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `cancelRejectedReason`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [components.OptionOrderCancelRejectedReason](../../models/components/optionordercancelrejectedreason.md)                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Used to denote when a cancel request has been rejected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | TOO_LATE_TO_CANCEL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `clientOrderId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | User-supplied unique option order ID. Cannot be more than 40 characters long.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | a6d5258b-6b23-478a-8145-98e79d60427a                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `clientReceivedTime`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Required for any client who is having Apex do CAT reporting on their behalf.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | {"seconds": 1712081516, "nanos": 902000000}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `createTime`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Time of the option order creation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | 2024-04-02T18:11:56.902Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `cumulativeNotionalValue`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [components.OptionOrderCumulativeNotionalValue](../../models/components/optionordercumulativenotionalvalue.md)                                                                                                                                                                                                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | This represents the absolute value of the notional amount (without fees) transacted across all of this legs. If present, this will always a positive number, or zero. This field will be empty if there are no leg executions.                                                                                                                                                                                                                                                                                                                        | {<br/>"value": "120.68"<br/>}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `cumulativeNotionalValueDirection`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | [components.CumulativeNotionalValueDirection](../../models/components/cumulativenotionalvaluedirection.md)                                                                                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | This represents the direction of the total filled notional value, which will be present if the `cumulative_notional_value` is also present. If there are no executions, this value will be absent. When the summed notional value of all CREDIT legs exceeds that of the DEBIT legs a CREDIT will be reported here; otherwise a DEBIT will be reported.                                                                                                                                                                                               | CREDIT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `currencyCode`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Only "USD" is supported. Full list of currency codes is defined at: https://en.wikipedia.org/wiki/ISO_4217                                                                                                                                                                                                                                                                                                                                                                                                                                            | USD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `fees`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [components.TradingFee](../../models/components/tradingfee.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Fees that will be applied to this option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | [<br/>{<br/>"amount": {<br/>"value": "5.00"<br/>},<br/>"type": "BROKER_FEE"<br/>}<br/>]                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `lastUpdateTime`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Time of the last option order update                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 2024-04-02T18:12:49.360Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `legs`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [components.OptionOrderLeg](../../models/components/optionorderleg.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The legs of this option order. Only a single leg is allowed to be specified, and it must be for an OPTION security.                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `limitPrice`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | [components.OptionOrderLimitPrice](../../models/components/optionorderlimitprice.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The limit price for this option order. For single-leg option orders, this is the price per contract which the filled order must match or beat. For multi-leg orders, this represents the amortized "price per unit" that must be matched or beat. (E.g. with a limit price of a $4 DEBIT, and an order with 2 legs that includes one leg buy 100 shares of SBX and another leg to sell 1 contract of SBX, then the fills will be guaranteed to result in no more than a $400--4 USD X 100 shares/contract--total debit against the ordering account.) | {<br/>"value": "95.99"<br/>}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `name`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | System generated name of the option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | accounts/01HBRQ5BW6ZAY4BNWP4GWRD80X/optionOrders/ebb0c9b5-2c74-45c9-a4ab-40596b778706                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `optionOrderId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | System generated unique id for the option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | ebb0c9b5-2c74-45c9-a4ab-40596b778706                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `orderDate`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [components.OptionOrderOrderDate](../../models/components/optionorderorderdate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The date on which the option order will go to the market: must be "today". Option orders will only be accepted during normal trading hours.                                                                                                                                                                                                                                                                                                                                                                                                           | {<br/>"day": 25,<br/>"month": 4,<br/>"year": 2024<br/>}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `orderRejectedReason`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [components.OptionOrderOrderRejectedReason](../../models/components/optionorderorderrejectedreason.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | When an option order has the REJECTED status, this will be populated with a system code describing the rejection.                                                                                                                                                                                                                                                                                                                                                                                                                                     | FAILED_BUYING_POWER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `orderStatus`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | [components.OptionOrderOrderStatus](../../models/components/optionorderorderstatus.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The processing status of the option order                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | FILLED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `orderType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [components.OptionOrderOrderType](../../models/components/optionorderordertype.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The execution type of this option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | LIMIT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `priceDirection`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [components.OptionOrderPriceDirection](../../models/components/optionorderpricedirection.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The direction of the price, which indicates whether the entire option order should result in a credit to the account placing the order, or a debit from the account placing the order.                                                                                                                                                                                                                                                                                                                                                                | CREDIT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `quantity`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [components.OptionOrderQuantity](../../models/components/optionorderquantity.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The quantity of the option order to be placed. The `ratio_quantity` of each leg will be multiplied by this value to determine the total number of units being ordered within each leg. (E.g. if a quantity of 3 is specified, and a leg with a `ratio_quantity` of 2 is specified, then the total number of contracts being ordered by that leg will be 6.)                                                                                                                                                                                           | {<br/>"value": "20.55219"<br/>}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `specialReportingInstructions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [components.OptionOrderSpecialReportingInstructions](../../models/components/optionorderspecialreportinginstructions.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Special Reporting Instructions to be applied to this option order. Can include multiple Instructions.                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [<br/>"RISKLESS_PRINCIPAL",<br/>"WITH_RIGHTS"<br/>]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `timeInForce`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | [components.OptionOrderTimeInForce](../../models/components/optionordertimeinforce.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Must be the value "DAY". Regulatory requirements dictate the system captures the intended time_in_force, which is why this a mandatory field.                                                                                                                                                                                                                                                                                                                                                                                                         | DAY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |