# OptionOrderLeg

The message describing an option order leg.

## Example Usage

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

let value: OptionOrderLeg = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Required                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assetId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The unique identifier of the asset in the Apex system. If the requested identifier does not match any known Apex asset, then this field will not be set.                                                                                                                                                                                                                                                                                                                                                    | 22091                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `assetType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [components.OptionOrderLegAssetType](../../models/components/optionorderlegassettype.md)                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The type of the asset in this option order leg. Orders with only a single leg may only contain an OPTION asset type. Orders with multiple legs must contain at least one OPTION leg, and no more than one EQUITY leg.                                                                                                                                                                                                                                                                                       | OPTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `averagePrice`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [components.AveragePrice](../../models/components/averageprice.md)                                                                                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The computed average price for this leg, which is a weighted average (by quantity) of the executed prices.                                                                                                                                                                                                                                                                                                                                                                                                  | {<br/>"value": "95.99"<br/>}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `direction`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [components.OptionOrderLegDirection](../../models/components/optionorderlegdirection.md)                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The computed direction for this leg. When `side` is BUY, `direction` will be DEBIT. When `side` is SELL, `direction` will be CREDIT.                                                                                                                                                                                                                                                                                                                                                                        | CREDIT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `executions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [components.OptionOrderLegExecution](../../models/components/optionorderlegexecution.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The list of executions contributing to the fill of this leg of the option order.                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `identifier`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The identifier of the asset, in the format specified by `identifier_type`. When `identifier_type` is OSI, this field must be a valid OSI identifier, which is between 16 and 21 characters. (This value must not contain any spaces between the symbol and expiry date.) When `identifier_type` is SYMBOL, this field must contain the ticker value of the security, which is between 1 and 6 characters and must conform the same input constraints called out in the non-options single option order API. | SBUX250221C00084000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `identifierType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [components.OptionOrderLegIdentifierType](../../models/components/optionorderlegidentifiertype.md)                                                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The format of the identifier value used to look up the security. When `asset_type` is OPTION, the identifier_type must be OSI.                                                                                                                                                                                                                                                                                                                                                                              | OSI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `ratioQuantity`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | *number*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | This specifies the quantity of security to be ordered in this leg. For a single-leg order, this value must be 1 (one). For a multi-leg order, this value must be greater than zero, and the total number of shares or contracts ordered at the market will be `order.quantity * leg.ratio_quantity`.                                                                                                                                                                                                        | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `side`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [components.OptionOrderLegSide](../../models/components/optionorderlegside.md)                                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The side of the option order to be sent to the market.                                                                                                                                                                                                                                                                                                                                                                                                                                                      | SELL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `sideModifier`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [components.OptionOrderLegSideModifier](../../models/components/optionorderlegsidemodifier.md)                                                                                                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | The open/close modification of the side, signaling whether this option order leg intends to OPEN a new position, or to CLOSE an existing one.                                                                                                                                                                                                                                                                                                                                                               | OPEN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |