# TradeAllocationCreate

A TradeAllocation represents the movement of positions between two ascend accounts.

## Example Usage

```typescript
import {
  ToSide,
  TradeAllocationCreate,
  TradeAllocationCreateAssetType,
  TradeAllocationCreateBrokerCapacity,
  TradeAllocationCreateIdentifierType,
} from "@apexfintechsolutions/ascend-sdk/models/components";

let value: TradeAllocationCreate = {
  assetType: TradeAllocationCreateAssetType.Equity,
  brokerCapacity: TradeAllocationCreateBrokerCapacity.Agency,
  executionTime: new Date("2024-07-17T12:00:00Z"),
  fromAccountId: "01HASWB2DTMRT3DAM45P56J2H3",
  identifier: "AAPL",
  identifierType: TradeAllocationCreateIdentifierType.Symbol,
  price: {},
  quantity: {},
  sourceApplication: "Trading-App",
  toAccountId: "02HASWB2DTMRT3DAM45P56J2T2",
  toSide: ToSide.Buy,
};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Required                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `accruedInterestAmount`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [components.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `additionalInstructions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Free form instructions that can be used to provide additional instructions (that are not captured by existing special instructions) and will be put on the trade confirm.                                                                                                                                                                                                                                                                                                                                                                                                                                          | ACATS instruction                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `assetType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [components.TradeAllocationCreateAssetType](../../models/components/tradeallocationcreateassettype.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Type of the asset being traded.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | EQUITY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `bondYield`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [components.BondYieldCreate](../../models/components/bondyieldcreate.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The yield associated with an individual fill of a fixed income trade. Required for FIXED_INCOME trades. Not allowed for trades of other instrument types.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `brokerCapacity`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [components.TradeAllocationCreateBrokerCapacity](../../models/components/tradeallocationcreatebrokercapacity.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Broker capacity for the trade.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | AGENCY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `clientOrderId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The unique identifier that is associated with an order. This is useful for associating the trade allocation with the original trade. This will be assigned a unique UUID if not provided.                                                                                                                                                                                                                                                                                                                                                                                                                          | 00be5285-0623-4560-8c58-f05af2c56ba0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `commissionAmount`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [components.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `executionTime`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Timestamp of when the trade allocation took place. If settlement_date is not provided, this field will be converted into Eastern Time and used to calculate settlement_date.                                                                                                                                                                                                                                                                                                                                                                                                                                       | 2024-07-17 12:00:00 +0000 UTC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `fees`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [components.BookingFeeCreate](../../models/components/bookingfeecreate.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Client calculated fees that will only be applied to the to_account_id. Regulatory fees will be calculated automatically if they are not explicitly overwritten or suppressed.                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `fromAccountId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The ULID formatted account_id that the positions will be moved from.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | 01HASWB2DTMRT3DAM45P56J2H3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `grossAmount`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [components.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `identifier`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Identifier (of the type specified in `identifier_type`). Responses will supply the originally requested identifier.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | AAPL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `identifierType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [components.TradeAllocationCreateIdentifierType](../../models/components/tradeallocationcreateidentifiertype.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Identifier type for the asset being traded.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | SYMBOL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `issuingRegionCode`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Unicode CLDR region code. Issuing Region Code is required for some `identifier_type`s, especially CUSIP.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | US                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `lotMatchingInstructions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | [components.LotCreate](../../models/components/lotcreate.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | One or many lot matching instructions for the trade allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `memo`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Caller provided but can be used for booking-service to note original trade details when booking into the error account or using the error asset.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Allocation failed due to insufficient funds                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `prevailingMarketPrice`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [components.DecimalCreate](../../models/components/decimalcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `price`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `priceAdjustment`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [components.PriceAdjustmentCreate](../../models/components/priceadjustmentcreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Price adjustment that will be applied to the net price of the security.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `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                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `settlementDate`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [components.DateCreate](../../models/components/datecreate.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 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`. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `sideModifier`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | [components.TradeAllocationCreateSideModifier](../../models/components/tradeallocationcreatesidemodifier.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Side modifier for the trade allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | SHORT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `sourceApplication`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The source of the submission.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Trading-App                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `specialInstructions`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [components.TradeAllocationCreateSpecialInstructions](../../models/components/tradeallocationcreatespecialinstructions.md)[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | An enumerated list of values used to indicate certain attributes about a trade allocation (E.g. BROKER_LIQUIDATION) and/or trigger downstream processing rules (e.g. SUPPRESS_TRACE_REPORTING)                                                                                                                                                                                                                                                                                                                                                                                                                     | [<br/>"SUPPRESS_SEC_FEE",<br/>"WITH_DIVIDEND"<br/>]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `toAccountId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | The ULID formatted account_id that the positions will be moved to.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 02HASWB2DTMRT3DAM45P56J2T2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `toSide`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [components.ToSide](../../models/components/toside.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Denotes the side of the position going into the to_account_id. A to_side of SELL indicates the position will be allocated with a BUY out of the from_account, and a SELL into the to_account.                                                                                                                                                                                                                                                                                                                                                                                                                      | BUY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `whenIssued`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | [components.TradeAllocationCreateWhenIssued](../../models/components/tradeallocationcreatewhenissued.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Denotes that this trade allocation was either when_issued or when_distributed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | WHEN_ISSUED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |