# OptionOrderCreate

The message describing an option order

## Example Usage

```typescript
import {
  OptionOrderCreate,
  OptionOrderCreateBrokerCapacity,
  OptionOrderCreateOrderType,
  OptionOrderCreateTimeInForce,
  PriceDirection,
} from "@apexfintechsolutions/ascend-sdk/models/components";

let value: OptionOrderCreate = {
  brokerCapacity: OptionOrderCreateBrokerCapacity.Agency,
  clientOrderId: "a6d5258b-6b23-478a-8145-98e79d60427a",
  currencyCode: "USD",
  legs: [],
  limitPrice: {},
  orderDate: {},
  orderType: OptionOrderCreateOrderType.Limit,
  priceDirection: PriceDirection.Credit,
  quantity: {},
  timeInForce: OptionOrderCreateTimeInForce.Day,
};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Required                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `brokerCapacity`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [components.OptionOrderCreateBrokerCapacity](../../models/components/optionordercreatebrokercapacity.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The capacity in which the broker is acting for this option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | AGENCY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `clientOrderId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `currencyCode`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Only "USD" is supported. Full list of currency codes is defined at: https://en.wikipedia.org/wiki/ISO_4217                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | USD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `fees`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [components.FeeCreate](../../models/components/feecreate.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/>]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `legs`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [components.OptionOrderLegCreate](../../models/components/optionorderlegcreate.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].<br/><br/> [BigDecimal]:<br/> https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html<br/> [decimal.Decimal]: https://docs.python.org/3/library/decimal.html                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `orderDate`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [components.DateCreate](../../models/components/datecreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:<br/><br/> * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date<br/><br/> Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `orderType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [components.OptionOrderCreateOrderType](../../models/components/optionordercreateordertype.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The execution type of this option order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | LIMIT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `priceDirection`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [components.PriceDirection](../../models/components/pricedirection.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].<br/><br/> [BigDecimal]:<br/> https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html<br/> [decimal.Decimal]: https://docs.python.org/3/library/decimal.html                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `specialReportingInstructions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | [components.OptionOrderCreateSpecialReportingInstructions](../../models/components/optionordercreatespecialreportinginstructions.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.OptionOrderCreateTimeInForce](../../models/components/optionordercreatetimeinforce.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Must be the value "DAY". Regulatory requirements dictate the system captures the intended time_in_force, which is why this a mandatory field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | DAY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |