# Trade model: MMSalesIntervention

This page describes the FX Integration API's **MMSalesIntervention** trade model, as defined in the file `config/TradingAdapter/Blade/DataSource/etc/trademodels.xml` in the FX Integration API Kit.

This documentation is for the FX Integration API 12.10.0.

Trade models are XML-defined state machines used by the [Java Trading API](https://docs.caplin.com/developer/api/trading_java/latest/) and Caplin Trader's [Trading API](../caplin-trader/4/trading-api/index.md) to manage trading workflows. For more information on trade model XML definitions, see the [Trade model XML schema](../caplin-platform/cis/cis-trade-model-schema.md) reference.

## State model

The MMSalesIntervention trade model's state model in Mermaid JS format:

```mermaid
%% State diagram for the MMSalesIntervention trade model
stateDiagram-v2
    [*] --> Initial
    Initial --> PickUpSent : PickUp (client)
    PickUpSent --> PickUpPending : PickUpAck (server)
    PickUpSent --> Error : Error (server)
    PickUpSent --> ClientRejected : PickUpRejected (server)
    PickUpPending --> PickedUp : PriceUnavailable (server)
    PickUpPending --> PickedUp : PriceUpdate (server)
    PickUpPending --> HoldSent : Hold (client)
    PickUpPending --> Error : Error (server)
    PickUpPending --> RejectSent : Reject (client)
    PickUpPending --> ClientRejected : ClientReject (server)
    PickedUp --> QuoteSent : Quote (client)
    PickedUp --> PickedUp : PriceUpdate (server)
    PickedUp --> HoldSent : Hold (client)
    PickedUp --> Error : Error (server)
    PickedUp --> RejectSent : Reject (client)
    PickedUp --> ClientRejected : ClientReject (server)
    QuoteSent --> Error : Error (server)
    QuoteSent --> QuoteSent : PriceUpdate (server)
    QuoteSent --> ClientRejected : ClientReject (server)
    QuoteSent --> RejectSent : Reject (client)
    QuoteSent --> WithdrawSent : Withdraw (client)
    QuoteSent --> Quoted : QuoteAck (server)
    Error --> [*] 
    ClientRejected --> [*] 
    RejectSent --> TraderRejected : RejectAck (server)
    RejectSent --> Error : Error (server)
    TraderRejected --> [*] 
    WithdrawSent --> PickedUp : WithdrawAck (server)
    WithdrawSent --> Error : Error (server)
    WithdrawSent --> WithdrawSent : PriceUpdate (server)
    WithdrawSent --> RejectSent : Reject (client)
    Quoted --> TradeConfirmation : TradeConfirmed (server)
    Quoted --> Quoted : PriceUpdate (server)
    Quoted --> WithdrawSent : Withdraw (client)
    Quoted --> Error : Error (server)
    Quoted --> ClientRejected : ClientReject (server)
    Quoted --> RejectSent : Reject (client)
    Quoted --> QuoteSent : Quote (client)
    TradeConfirmation --> [*] 
    HoldSent --> Held : HoldAck (server)
    HoldSent --> Error : Error (server)
    Held --> [*]
```

The MMSalesIntervention trade model's state model in a flat state-transition matrix:

| Source state | Event trigger | Origin | Target state |
| ------------ | ------------- | ------ | ------------ |
| [*] | - | - | Initial |
| Initial | PickUp | client | PickUpSent |
| PickUpSent | PickUpAck | server | PickUpPending |
| PickUpSent | Error | server | Error |
| PickUpSent | PickUpRejected | server | ClientRejected |
| PickUpPending | PriceUnavailable | server | PickedUp |
| PickUpPending | PriceUpdate | server | PickedUp |
| PickUpPending | Hold | client | HoldSent |
| PickUpPending | Error | server | Error |
| PickUpPending | Reject | client | RejectSent |
| PickUpPending | ClientReject | server | ClientRejected |
| PickedUp | Quote | client | QuoteSent |
| PickedUp | PriceUpdate | server | PickedUp |
| PickedUp | Hold | client | HoldSent |
| PickedUp | Error | server | Error |
| PickedUp | Reject | client | RejectSent |
| PickedUp | ClientReject | server | ClientRejected |
| QuoteSent | Error | server | Error |
| QuoteSent | PriceUpdate | server | QuoteSent |
| QuoteSent | ClientReject | server | ClientRejected |
| QuoteSent | Reject | client | RejectSent |
| QuoteSent | Withdraw | client | WithdrawSent |
| QuoteSent | QuoteAck | server | Quoted |
| Error | - | - | [*] |
| ClientRejected | - | - | [*] |
| RejectSent | RejectAck | server | TraderRejected |
| RejectSent | Error | server | Error |
| TraderRejected | - | - | [*] |
| WithdrawSent | WithdrawAck | server | PickedUp |
| WithdrawSent | Error | server | Error |
| WithdrawSent | PriceUpdate | server | WithdrawSent |
| WithdrawSent | Reject | client | RejectSent |
| Quoted | TradeConfirmed | server | TradeConfirmation |
| Quoted | PriceUpdate | server | Quoted |
| Quoted | Withdraw | client | WithdrawSent |
| Quoted | Error | server | Error |
| Quoted | ClientReject | server | ClientRejected |
| Quoted | Reject | client | RejectSent |
| Quoted | Quote | client | QuoteSent |
| TradeConfirmation | - | - | [*] |
| HoldSent | HoldAck | server | Held |
| HoldSent | Error | server | Error |
| Held | - | - | [*] |

## Event message specifications

This section describes the messages sent between client and server when a state-model event occurs. The origin of an event (the client or the server) is specified in brackets after the name of the event.

The specification of some events depends on the type of financial product being traded, and when this applies, the variant specifications are detailed under level-4 headings.

Back-end developers build server events by using classes in the Caplin's FX Integration API, a Java library that makes it easy to provide data to Caplin's web applications. Where appropriate, the specifications below include references to JavaDoc documentation and code examples.

### Event: PickUp (client)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "PickUp",
  "message_origin": "client",
  "fields": [
    {
      "name": "MsgType",
      "type": "String",
      "flags": "",
      "definition": "Name of the transition",
      "example_value": "PickUp",
      "deprecated": false
    },
    {
      "name": "RequestID",
      "type": "String",
      "flags": "",
      "definition": "The RequestID. A Unique identifier, must remain the same for each event in the trade model",
      "example_value": "",
      "deprecated": false
    },
    {
      "name": "TradeRequestID",
      "type": "string",
      "flags": "",
      "definition": "The unique id identifying the trade to be picked up.",
      "example_value": "",
      "deprecated": false
    },
    {
      "name": "AppID",
      "type": "",
      "flags": "",
      "definition": "A unique identifier for the client application",
      "example_value": "",
      "deprecated": false
    }
  ]
}
```

### Event: Hold (client)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "Hold",
  "message_origin": "client",
  "fields": [
    {
      "name": "MsgType",
      "type": "String",
      "flags": "",
      "definition": "Name of the transition",
      "example_value": "Hold",
      "deprecated": false
    },
    {
      "name": "RequestID",
      "type": "String",
      "flags": "",
      "definition": "The RequestID. A Unique identifier, must remain the same for each event in the trade model",
      "example_value": "",
      "deprecated": false
    }
  ]
}
```

### Event: Quote (client)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "Quote",
  "message_origin": "client",
  "parts": [
    {
      "part_name": "MMInterventionQuote",
      "fields": [
        {
          "name": "PricingType",
          "type": "",
          "flags": "",
          "definition": "The type of pricing, either QUOTE or STREAM, QUOTE will send a send a singe quote to the client, while STREAM will stream rates to the client using the       given margins.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestMargin",
          "type": "decimal",
          "flags": "",
          "definition": "Interest margin on the given InterestRate.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TraderInterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount with no client margin applied to it.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "OverallTimeOut",
          "type": "",
          "flags": "",
          "definition": "This field is the length of time in seconds that a sales intervention quote is valid for.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "RemainingTimeOutMillis",
          "type": "integer",
          "flags": "",
          "definition": "The number of milliseconds remaining of the OverallTimeOut before this stream is timed out. This is not present for standard price updates.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "AppID",
          "type": "",
          "flags": "",
          "definition": "A unique identifier for the client application",
          "example_value": "",
          "deprecated": false
        }
      ]
    }
  ],
  "fields": [
    {
      "name": "MsgType",
      "type": "String",
      "flags": "",
      "definition": "Name of the transition",
      "example_value": "Quote",
      "deprecated": false
    },
    {
      "name": "RequestID",
      "type": "String",
      "flags": "",
      "definition": "The RequestID. A Unique identifier, must remain the same for each event in the trade model",
      "example_value": "",
      "deprecated": false
    }
  ]
}
```

### Event: Reject (client)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "Reject",
  "message_origin": "client",
  "fields": [
    {
      "name": "MsgType",
      "type": "String",
      "flags": "",
      "definition": "Name of the transition",
      "example_value": "Reject",
      "deprecated": false
    },
    {
      "name": "RequestID",
      "type": "String",
      "flags": "",
      "definition": "The RequestID. A Unique identifier, must remain the same for each event in the trade model",
      "example_value": "",
      "deprecated": false
    }
  ]
}
```

### Event: Withdraw (client)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "Withdraw",
  "message_origin": "client",
  "fields": [
    {
      "name": "MsgType",
      "type": "String",
      "flags": "",
      "definition": "Name of the transition",
      "example_value": "Withdraw",
      "deprecated": false
    },
    {
      "name": "RequestID",
      "type": "String",
      "flags": "",
      "definition": "The RequestID. A Unique identifier, must remain the same for each event in the trade model",
      "example_value": "",
      "deprecated": false
    }
  ]
}
```




### Event: ClientReject (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "ClientReject",
  "message_origin": "server",
  "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.SalesTradeConfirmation",
  "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.SalesTradeConfirmation.html",
  "instantiation_pattern": "Builder (via .newBuilder())",
  "code_example": "https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/examples/fxapi/generated/motif/mm/tradeconfirmation/TradeConfTypesDef/SalesTradeConfirmationExample.html",
  "parts": [
    {
      "part_name": "TradeConfirmation",
      "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.TradeConfirmation",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.TradeConfirmation.html",
      "parts": [
        {
          "part_name": "CommonTradeConfirmationFields",
          "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef.CommonTradeConfirmationFields",
          "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfPartsDef.CommonTradeConfirmationFields.html",
          "fields": [
            {
              "name": "TOBOUser",
              "type": "string",
              "flags": "",
              "definition": "The client who the trade is for.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "TraderUsername",
              "type": "string",
              "flags": "",
              "definition": "The name of the trader providing the price to the user, or NO_TRADER if there is none.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Account",
              "type": "string",
              "flags": "",
              "definition": "The used account for the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Action",
              "type": "string",
              "flags": "",
              "definition": "Withdraw or deposit for Call Deposit.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CallAccount",
              "type": "string",
              "flags": "",
              "definition": "The account which is being withdrawn from or deposited to.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Currency",
              "type": "string",
              "flags": "",
              "definition": "The currency in which the trade is made.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "MaturityDate",
              "type": "date",
              "flags": "",
              "definition": "The maturity date of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "MaturityTenor",
              "type": "string",
              "flags": "",
              "definition": "The maturity tenor of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "StartDate",
              "type": "date",
              "flags": "",
              "definition": "The start date of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "StartTenor",
              "type": "string",
              "flags": "",
              "definition": "The start tenor of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "TradeID",
              "type": "string",
              "flags": "",
              "definition": "The unique id identifying the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PrincipalAmount",
              "type": "decimal",
              "flags": "",
              "definition": "The original amount that the trade was created with specified in the provided Currency.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestRate",
              "type": "decimal",
              "flags": "",
              "definition": "Interest rate on the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "IndicativeProfitRate",
              "type": "string",
              "flags": "",
              "definition": "Indicative profit rate on the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestRateDPS",
              "type": "decimal",
              "flags": "",
              "definition": "The precision for a specified InterestRate.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestAmount",
              "type": "decimal",
              "flags": "",
              "definition": "Interest amount (specified in the provided Currency) calculated from the interest rate and principal amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PrincipalPlusInterest",
              "type": "decimal",
              "flags": "",
              "definition": "Composite amount between principal amount and interest amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PaymentFrequency",
              "type": "string",
              "flags": "",
              "definition": "Interest payment frequencies for term deposits, this could be ZERO-COUPON, MONTHLY, QUARTERLY, SEMI-ANNUALLY or ANNUALLY.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "AllocationMode",
              "type": "string",
              "flags": "",
              "definition": "Determines whether the amount will be alLocated to a single or multiple accounts. Supported types are [SINGLE, MULTIPLE] and is defaulted to SINGLE.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "NumberOfDays",
              "type": "string",
              "flags": "",
              "definition": "The number of days between the start and maturity dates.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "ExecutionDateTime",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160322123621",
              "deprecated": false
            },
            {
              "name": "EntityId",
              "type": "string",
              "flags": "",
              "definition": "The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE. If this field is absent on a leg then the default entity should be presumed.",
              "example_value": "CUSTONE",
              "deprecated": false
            },
            {
              "name": "EntityDescription",
              "type": "string",
              "flags": "",
              "definition": "The description of a trade on behalf of entity.",
              "example_value": "Customer 1",
              "deprecated": false
            },
            {
              "name": "TradeDate",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160314",
              "deprecated": false
            },
            {
              "name": "TradingType",
              "type": "string",
              "flags": "",
              "definition": "The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "QuoteID",
              "type": "string",
              "flags": "",
              "definition": "Unique id for a quote, used to determine which quote has been used for trade execution.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "QuoteDateTime",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160314013000",
              "deprecated": false
            },
            {
              "name": "CanAffirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Affirm the Trade Details are as agreed.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DisplayFields",
              "type": "string",
              "flags": "",
              "definition": "Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
              "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
              "deprecated": false
            },
            {
              "name": "CanCapitalIncrease",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Capital Increase the Trade amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanRollOver",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Roll Over the Trade amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanChangeSSI",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Change the Settlement Instructions.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanGiveNotice",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Give notice for Money Market trades.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "HasPostTradeHistory",
              "type": "boolean",
              "flags": "",
              "definition": "Define whether post-trade history (related deals) is available.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "NoticePeriodDescription",
              "type": "string",
              "flags": "",
              "definition": "The notice period description for the trade, sent as the raw display value or a translation token.",
              "example_value": "32 Days",
              "deprecated": false
            },
            {
              "name": "NoticePeriod",
              "type": "string",
              "flags": "",
              "definition": "The notice period for the trade.",
              "example_value": "32D",
              "deprecated": false
            },
            {
              "name": "IsShariaTrade",
              "type": "boolean",
              "flags": "",
              "definition": "Indicates whether the trade is a Sharia trade",
              "example_value": "true",
              "deprecated": false
            },
            {
              "name": "CanConfirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Confirm the Settlement Details are now final.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "ConfirmedBy",
              "type": "string",
              "flags": "",
              "definition": "The name of the user who confirmed a trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Tags",
              "type": "string",
              "flags": "",
              "definition": "Tags for a trade.",
              "example_value": "method={'import':'static com.caplin.motif.fx.config.definitions.common.Tag','name':'Arrays.asList'}",
              "deprecated": false
            },
            {
              "name": "ConfirmedDateTime",
              "type": "datetime",
              "flags": "",
              "definition": "The time at which a trade was confirmed in ISO-8601 format",
              "example_value": "2018-03-16T07:25:16+00:00",
              "deprecated": false
            },
            {
              "name": "CanUnwind",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Unwind the Trade amount.",
              "example_value": "true",
              "deprecated": false
            },
            {
              "name": "Fees",
              "type": "decimal",
              "flags": "",
              "definition": "Fees on the given PrincipalAmount for unwind.",
              "example_value": "10.0",
              "deprecated": false
            },
            {
              "name": "ParentTradeID",
              "type": "string",
              "flags": "",
              "definition": "The unique id identifying the parent trade of this trade in the case of post trade workflows.",
              "example_value": "00002456",
              "deprecated": false
            },
            {
              "name": "NoticeGiven",
              "type": "boolean",
              "flags": "",
              "definition": "Reflects if notice has been given.",
              "example_value": "true",
              "deprecated": false
            }
          ]
        },
        {
          "part_name": "SettlementTradeFields",
          "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementTradeFields",
          "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementTradeFields.html",
          "parts": [
            {
              "part_name": "SettlementFields",
              "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementFields",
              "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementFields.html",
              "fields": [
                {
                  "name": "Un_PaySettlementId",
                  "type": "string",
                  "flags": "",
                  "definition": "The identifier for the settlement instruction.",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PayIsDefaultSettlementInstruction",
                  "type": "boolean",
                  "flags": "",
                  "definition": "Is this the default settlement instruction for this currency",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementInstructionType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]",
                  "example_value": "EXISTING",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]",
                  "example_value": "PRINCIPAL",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementRemarks",
                  "type": "string",
                  "flags": "",
                  "definition": "The remarks corresponding to the settlement details",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementDisplayName",
                  "type": "string",
                  "flags": "",
                  "definition": "The name of the settlement instruction. This field can be omitted.",
                  "example_value": "[CCY] Account 1",
                  "deprecated": false
                }
              ]
            },
            {
              "part_name": "SettlementFields",
              "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementFields",
              "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementFields.html",
              "fields": [
                {
                  "name": "Un_ReceiveSettlementId",
                  "type": "string",
                  "flags": "",
                  "definition": "The identifier for the settlement instruction.",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveIsDefaultSettlementInstruction",
                  "type": "boolean",
                  "flags": "",
                  "definition": "Is this the default settlement instruction for this currency",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementInstructionType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]",
                  "example_value": "EXISTING",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]",
                  "example_value": "PRINCIPAL",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementRemarks",
                  "type": "string",
                  "flags": "",
                  "definition": "The remarks corresponding to the settlement details",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementDisplayName",
                  "type": "string",
                  "flags": "",
                  "definition": "The name of the settlement instruction. This field can be omitted.",
                  "example_value": "[CCY] Account 1",
                  "deprecated": false
                }
              ]
            }
          ],
          "fields": [
            {
              "name": "Un_CanAffirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Affirm the Trade Details are as agreed.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Un_IsReceiveInterestSplit",
              "type": "boolean",
              "flags": "",
              "definition": "Whether the receive Settlement Instruction has been split into separate Principal and Interest instructions.",
              "example_value": "",
              "deprecated": false
            }
          ]
        }
      ]
    },
    {
      "part_name": "SalesCommonTradeConfirmationFields",
      "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef.SalesCommonTradeConfirmationFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfPartsDef.SalesCommonTradeConfirmationFields.html",
      "fields": [
        {
          "name": "TraderInterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount with no client margin applied to it.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestMargin",
          "type": "decimal",
          "flags": "Editable",
          "definition": "Interest margin on the given InterestRate.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "StreamingMode",
          "type": "string",
          "flags": "",
          "definition": "Indicates whether the rates/margins of this trade have been manually set",
          "example_value": "MANUAL, STREAMING",
          "deprecated": false
        },
        {
          "name": "Profit",
          "type": "decimal",
          "flags": "",
          "definition": "The sales profit in the specified currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitCurrency",
          "type": "string",
          "flags": "",
          "definition": "The profit currency that the ProfitRate is being provided for.",
          "example_value": "USD",
          "deprecated": false
        },
        {
          "name": "ProfitCurrencyDPS",
          "type": "integer",
          "flags": "",
          "definition": "The number of decimal places that should be used for formatting the amount in profit currency field.",
          "example_value": "2",
          "deprecated": false
        },
        {
          "name": "ProfitIsHouse",
          "type": "boolean",
          "flags": "",
          "definition": "Whether the field ProfitCurrency is the system/house currency or not.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitRate",
          "type": "decimal",
          "flags": "",
          "definition": "The conversion rate between the contra currency and the profit currency. This can be used for entering profit in an amount of settlement currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TradeStatus",
          "type": "string",
          "flags": "",
          "definition": "The current status of the trade. Supported types are [AWAITING-TRADER, AWAITING-PRICE, PRICED, EXECUTING, CLOSED, REJECTED, ERRORED, COMPLETED]. CLOSED means the client cancelled the trade request, REJECTED indicates it was rejected by the dealer.",
          "example_value": "AWAITING-PRICE",
          "deprecated": false
        },
        {
          "name": "Reasons",
          "type": "string",
          "flags": "",
          "definition": "A JSON structure containing all the reasons and information about why the trade requires intervention. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultReasonsHeaderDisplayFields','name':'addDefaultReasonsHeaderDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        },
        {
          "name": "DisplayFields",
          "type": "string",
          "flags": "",
          "definition": "Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        }
      ]
    }
  ]
}
```

Java class: [com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.SalesTradeConfirmation](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.SalesTradeConfirmation.html)

Instantiation pattern: Static Factory Method (via `TradeConfTypesDef.SalesTradeConfirmation.newBuilder()`)

Java code example:

```java
package com.caplin.examples.fxapi.generated.motif.mm.tradeconfirmation.TradeConfTypesDef; 

import java.math.BigInteger;
import static com.caplin.motif.fx.config.DefaultDisplayFields.addDefaultSalesAllocationDetailsUpdateFields;
import static com.caplin.motif.fx.config.definitions.common.Tag;

import com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef;

public class SalesTradeConfirmationExample {
    public static void main(String[] args) {
                    		
		TradeConfTypesDef.SalesTradeConfirmation salesTradeConfirmation =
		TradeConfTypesDef.SalesTradeConfirmation
			.newBuilder()
			.setSalesCommonFields(
			TradeConfPartsDef.SalesCommonTradeConfirmationFields
				.newBuilder()
				.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
				.setInterestMargin(BigDecimal.valueOf(0.0), true)
				.setInterestMarginEditable()
				.setProfit(BigDecimal.valueOf(1000))
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS(5)
				.setProfitIsHouse(true)
				.setProfitRate("1.091790")
				.setReasons(arg)
				.setStreamingMode("MANUAL, STREAMING")
				.setTradeStatus("AWAITING-PRICE")
				.setTraderInterestRate("")
				.build())
			.setTradeConfirmation(
			TradeConfTypesDef.TradeConfirmation
				.newBuilder()
				.addSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.setCanAffirm(true)
					.setIsReceiveInterestSplit("")
					.setPay(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.setIsDefaultSettlementInstruction("")
						.setSettlementDisplayName("[CCY] Account 1")
						.setSettlementId("")
						.setSettlementInstructionType("EXISTING")
						.setSettlementRemarks("")
						.setSettlementType("")
						.build())
					.setReceive(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.build())
					.build())
				.setCommonFields(
				TradeConfPartsDef.CommonTradeConfirmationFields
					.newBuilder()
					.setAccount("Garfields|GARF")
					.setAction("")
					.setAllocationMode("")
					.setCallAccount("")
					.setCanAffirm(true)
					.setCanCapitalIncrease("")
					.setCanChangeSSI(true)
					.setCanConfirm("")
					.setCanGiveNotice("")
					.setCanRollOver(true)
					.setCanUnwind("")
					.setConfirmedBy("")
					.setConfirmedDateTime("2018-03-16T07:25:16+00:00")
					.setCurrency("USD")
					.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
					.setEntityDescription("Customer 1")
					.setEntityId("CUSTONE")
					.setExecutionDateTime("20160322123621")
					.setExtraFields("")
					.setFees("")
					.setHasPostTradeHistory("")
					.setIndicativeProfitRate("")
					.setInterestAmount(BigDecimal.valueOf(0.0))
					.setInterestRate(BigDecimal.valueOf(0.0))
					.setInterestRateDPS("")
					.setIsShariaTrade("")
					.setMaturityDate(LocalDate.now())
					.setMaturityTenor("")
					.setNoticeGiven("")
					.setNoticePeriod("")
					.setNoticePeriodDescription("")
					.setNumberOfDays("")
					.setParentTradeID("")
					.setPaymentFrequency("")
					.setPrincipalAmount(BigDecimal.valueOf(0.0))
					.setPrincipalPlusInterest("")
					.setQuoteDateTime("")
					.setQuoteID("")
					.setStartDate(LocalDate.now())
					.setStartTenor("1W")
					.setTOBOUser("client@customer.co.za")
					.setTags(Arrays.asList(/* ... */))
					.setTradeDate("20160314")
					.setTradeID("00001561")
					.setTraderUsername("sales_trader@novobank.co.za")
					.setTradingType("SPOT")
					.build())
				.setSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.build(), 0)
				.build())
			.build();
            
    }
}
```

### Event: HoldAck (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "HoldAck",
  "message_origin": "server"
}
```

### Event: PickUpAck (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "PickUpAck",
  "message_origin": "server",
  "java_class": "com.caplin.generated.motif.mm.tradedetails.TradeDetailsTypesDef.TradeDetails",
  "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradedetails/TradeDetailsTypesDef.TradeDetails.html",
  "instantiation_pattern": "Builder (via .newBuilder())",
  "code_example": "https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/examples/fxapi/generated/motif/mm/tradedetails/TradeDetailsTypesDef/TradeDetailsExample.html",
  "parts": [
    {
      "part_name": "CommonTradeDetailsFields",
      "java_class": "com.caplin.generated.motif.mm.tradedetails.TradeDetailsPartsDef.CommonTradeDetailsFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradedetails/TradeDetailsPartsDef.CommonTradeDetailsFields.html",
      "fields": [
        {
          "name": "Account",
          "type": "string",
          "flags": "",
          "definition": "The used account for the trade.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TOBOUser",
          "type": "string",
          "flags": "",
          "definition": "The client who the trade is for.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TradingType",
          "type": "string",
          "flags": "",
          "definition": "The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].",
          "example_value": "",
          "deprecated": false
        }
      ]
    },
    {
      "part_name": "TradeDetailsFields",
      "java_class": "com.caplin.generated.motif.mm.tradedetails.TradeDetailsPartsDef.TradeDetailsFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradedetails/TradeDetailsPartsDef.TradeDetailsFields.html",
      "fields": [
        {
          "name": "Currency",
          "type": "string",
          "flags": "",
          "definition": "The currency in which the trade is made.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "PrincipalAmount",
          "type": "decimal",
          "flags": "",
          "definition": "The original amount that the trade was created with specified in the provided Currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "StartDate",
          "type": "date",
          "flags": "",
          "definition": "The start date of the trade.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "MaturityDate",
          "type": "date",
          "flags": "",
          "definition": "The maturity date of the trade.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestAmount",
          "type": "decimal",
          "flags": "",
          "definition": "Interest amount (specified in the provided Currency) calculated from the interest rate and principal amount.",
          "example_value": "",
          "deprecated": false
        }
      ]
    },
    {
      "part_name": "InterventionTradeDetailsFields",
      "java_class": "com.caplin.generated.motif.mm.tradedetails.TradeDetailsPartsDef.InterventionTradeDetailsFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradedetails/TradeDetailsPartsDef.InterventionTradeDetailsFields.html",
      "fields": [
        {
          "name": "TradeStatus",
          "type": "string",
          "flags": "",
          "definition": "The current status of the trade. Supported types are [AWAITING-TRADER, AWAITING-PRICE, PRICED, EXECUTING, CLOSED, REJECTED, ERRORED, COMPLETED]. CLOSED means the client cancelled the trade request, REJECTED indicates it was rejected by the dealer.",
          "example_value": "AWAITING-PRICE",
          "deprecated": false
        },
        {
          "name": "Dealable",
          "type": "boolean",
          "flags": "",
          "definition": "Determines whether the trade is dealable or not.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "PricingMode",
          "type": "string",
          "flags": "",
          "definition": "Whether the price is automatically or manually priced. Supported types are [AUTO, MANUAL].",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "Competition",
          "type": "boolean",
          "flags": "",
          "definition": "Whether there is competition to price the trade to be intervened",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TradeRequestID",
          "type": "string",
          "flags": "",
          "definition": "The unique id identifying the trade to be picked up.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "IntervenerUsername",
          "type": "string",
          "flags": "",
          "definition": "The user who is currently intervening on and potentially pricing a trade.",
          "example_value": "head_trader@novobank.co.za",
          "deprecated": false
        },
        {
          "name": "EntityDescription",
          "type": "string",
          "flags": "",
          "definition": "The description of a trade on behalf of entity.",
          "example_value": "Customer 1",
          "deprecated": false
        }
      ]
    }
  ]
}
```

Java class: [com.caplin.generated.motif.mm.tradedetails.TradeDetailsTypesDef.TradeDetails](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/generated/motif/mm/tradedetails/TradeDetailsTypesDef.TradeDetails.html)

Instantiation pattern: Static Factory Method (via `TradeDetailsTypesDef.TradeDetails.newBuilder()`)

Java code example:

```java
package com.caplin.examples.fxapi.generated.motif.mm.tradedetails.TradeDetailsTypesDef; 

import java.math.BigInteger;

import com.caplin.generated.motif.mm.tradedetails.TradeDetailsPartsDef;
import com.caplin.generated.motif.mm.tradedetails.TradeDetailsTypesDef;

public class TradeDetailsExample {
    public static void main(String[] args) {
                    		
		TradeDetailsTypesDef.TradeDetails tradeDetails =
		TradeDetailsTypesDef.TradeDetails
			.newBuilder()
			.setCommonFields(
			TradeDetailsPartsDef.CommonTradeDetailsFields
				.newBuilder()
				.setAccount("Garfields|GARF")
				.setTOBOUser("client@customer.co.za")
				.setTradingType("SPOT")
				.build())
			.setInterventionTradeDetailsFields(
			TradeDetailsPartsDef.InterventionTradeDetailsFields
				.newBuilder()
				.setCompetition("")
				.setDealable("")
				.setEntityDescription("Customer 1")
				.setIntervenerUsername("head_trader@novobank.co.za")
				.setPricingMode("AUTO")
				.setTradeRequestID("000012345")
				.setTradeStatus("AWAITING-PRICE")
				.build())
			.setTradeDetailsFields(
			TradeDetailsPartsDef.TradeDetailsFields
				.newBuilder()
				.setCurrency("USD")
				.setInterestAmount(BigDecimal.valueOf(0.0))
				.setInterestRate("")
				.setMaturityDate(LocalDate.now())
				.setPrincipalAmount("")
				.setStartDate("20150620")
				.build())
			.build();
            
    }
}
```

### Event: PickUpRejected (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "PickUpRejected",
  "message_origin": "server"
}
```

### Event: PriceUpdate (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "PriceUpdate",
  "message_origin": "server",
  "java_class": "com.caplin.generated.motif.mm.rates.QuoteTypesDef.SalesQuote",
  "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/rates/QuoteTypesDef.SalesQuote.html",
  "instantiation_pattern": "Builder (via .newBuilder())",
  "code_example": "https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/examples/fxapi/generated/motif/mm/rates/QuoteTypesDef/SalesQuoteExample.html",
  "parts": [
    {
      "part_name": "Quote",
      "java_class": "com.caplin.generated.motif.mm.rates.QuoteTypesDef.Quote",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/rates/QuoteTypesDef.Quote.html",
      "parts": [
        {
          "part_name": "CommonFields",
          "java_class": "com.caplin.generated.motif.mm.rates.QuotePartsDef.CommonFields",
          "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/rates/QuotePartsDef.CommonFields.html",
          "fields": [
            {
              "name": "LoanQuoteID",
              "type": "string",
              "flags": "",
              "definition": "Unique id for a loan quote, used to determine which quote has been used for trade execution.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DepositQuoteID",
              "type": "string",
              "flags": "",
              "definition": "Unique id for a deposit quote, used to determine which quote has been used for trade execution.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "LoanInterestRate",
              "type": "decimal",
              "flags": "",
              "definition": "Interest rate on loaning the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestRateDPS",
              "type": "decimal",
              "flags": "",
              "definition": "The precision for a specified InterestRate.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DepositInterestRate",
              "type": "decimal",
              "flags": "",
              "definition": "Interest rate on depositing the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DepositClientInterestRate",
              "type": "decimal",
              "flags": "",
              "definition": "Client interest rate on depositing the given PrincipalAmount.",
              "example_value": "5.04",
              "deprecated": false
            },
            {
              "name": "LoanInterestAmount",
              "type": "decimal",
              "flags": "",
              "definition": "Interest amount (specified in the provided Currency) calculated from the loan interest rate and principal amount",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DepositInterestAmount",
              "type": "decimal",
              "flags": "",
              "definition": "Interest amount (specified in the provided Currency) calculated from the deposit interest rate and principal amount",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "LoanPrincipalPlusInterest",
              "type": "decimal",
              "flags": "",
              "definition": "Composite amount between principal amount and loan interest amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DepositPrincipalPlusInterest",
              "type": "decimal",
              "flags": "",
              "definition": "Composite amount between principal amount and deposit interest amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "OverallTimeout",
              "type": "integer",
              "flags": "",
              "definition": "The amount in seconds in which the trade will expire.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "RemainingTimeOutMillis",
              "type": "integer",
              "flags": "",
              "definition": "The number of milliseconds remaining of the OverallTimeOut before this stream is timed out. This is not present for standard price updates.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Fees",
              "type": "decimal",
              "flags": "",
              "definition": "Fees on the given PrincipalAmount for unwind.",
              "example_value": "10.0",
              "deprecated": false
            }
          ]
        }
      ]
    },
    {
      "part_name": "SalesCommonFields",
      "java_class": "com.caplin.generated.motif.mm.rates.QuotePartsDef.SalesCommonFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/rates/QuotePartsDef.SalesCommonFields.html",
      "fields": [
        {
          "name": "TraderInterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount with no client margin applied to it.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestMargin",
          "type": "decimal",
          "flags": "",
          "definition": "Interest margin on the given InterestRate.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitCurrency",
          "type": "string",
          "flags": "",
          "definition": "The profit currency that the ProfitRate is being provided for.",
          "example_value": "USD",
          "deprecated": false
        },
        {
          "name": "ProfitCurrencyDPS",
          "type": "integer",
          "flags": "",
          "definition": "The number of decimal places that should be used for formatting the amount in profit currency field.",
          "example_value": "2",
          "deprecated": false
        },
        {
          "name": "ProfitIsHouse",
          "type": "boolean",
          "flags": "",
          "definition": "Whether the field ProfitCurrency is the system/house currency or not.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitRate",
          "type": "decimal",
          "flags": "",
          "definition": "The conversion rate between the contra currency and the profit currency. This can be used for entering profit in an amount of settlement currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "Reasons",
          "type": "string",
          "flags": "",
          "definition": "A JSON structure containing all the reasons and information about why the trade requires intervention. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultReasonsHeaderDisplayFields','name':'addDefaultReasonsHeaderDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        },
        {
          "name": "IsShariaTrade",
          "type": "boolean",
          "flags": "",
          "definition": "Indicates whether the trade is a Sharia trade",
          "example_value": "true",
          "deprecated": false
        },
        {
          "name": "DisplayFields",
          "type": "string",
          "flags": "",
          "definition": "Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        }
      ]
    }
  ]
}
```

Java class: [com.caplin.generated.motif.mm.rates.QuoteTypesDef.SalesQuote](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/generated/motif/mm/rates/QuoteTypesDef.SalesQuote.html)

Instantiation pattern: Static Factory Method (via `QuoteTypesDef.SalesQuote.newBuilder()`)

Java code example:

```java
package com.caplin.examples.fxapi.generated.motif.mm.rates.QuoteTypesDef; 

import java.math.BigInteger;
import static com.caplin.motif.fx.config.DefaultDisplayFields.addDefaultSalesAllocationDetailsUpdateFields;

import com.caplin.generated.motif.mm.rates.QuotePartsDef;
import com.caplin.generated.motif.mm.rates.QuoteTypesDef;

public class SalesQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.SalesQuote salesQuote =
		QuoteTypesDef.SalesQuote
			.newBuilder()
			.setQuote(
			QuoteTypesDef.Quote
				.newBuilder()
				.setCommonFields(
				QuotePartsDef.CommonFields
					.newBuilder()
					.setDepositClientInterestRate("")
					.setDepositInterestAmount(BigDecimal.valueOf(0.0))
					.setDepositInterestRate(BigDecimal.valueOf(0.0))
					.setDepositPrincipalPlusInterest("")
					.setDepositQuoteID("")
					.setFees("")
					.setInterestRateDPS("")
					.setLoanInterestAmount(BigDecimal.valueOf(0.0))
					.setLoanInterestRate("")
					.setLoanPrincipalPlusInterest(BigDecimal.valueOf(0.0))
					.setLoanQuoteID("")
					.setOverallTimeout("")
					.setRemainingTimeOutMillis("")
					.build())
				.build())
			.setSalesCommonFields(
			QuotePartsDef.SalesCommonFields
				.newBuilder()
				.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
				.setInterestMargin("")
				.setIsShariaTrade(true)
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS("5")
				.setProfitIsHouse("")
				.setProfitRate(BigDecimal.valueOf(1.091790))
				.setReasons(arg)
				.setTraderInterestRate(BigDecimal.valueOf(0.0))
				.build())
			.build();
            
    }
}
```

### Event: QuoteAck (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "QuoteAck",
  "message_origin": "server"
}
```

### Event: TradeConfirmed (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "TradeConfirmed",
  "message_origin": "server",
  "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.SalesTradeConfirmation",
  "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.SalesTradeConfirmation.html",
  "instantiation_pattern": "Builder (via .newBuilder())",
  "code_example": "https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/examples/fxapi/generated/motif/mm/tradeconfirmation/TradeConfTypesDef/SalesTradeConfirmationExample.html",
  "parts": [
    {
      "part_name": "TradeConfirmation",
      "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.TradeConfirmation",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.TradeConfirmation.html",
      "parts": [
        {
          "part_name": "CommonTradeConfirmationFields",
          "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef.CommonTradeConfirmationFields",
          "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfPartsDef.CommonTradeConfirmationFields.html",
          "fields": [
            {
              "name": "TOBOUser",
              "type": "string",
              "flags": "",
              "definition": "The client who the trade is for.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "TraderUsername",
              "type": "string",
              "flags": "",
              "definition": "The name of the trader providing the price to the user, or NO_TRADER if there is none.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Account",
              "type": "string",
              "flags": "",
              "definition": "The used account for the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Action",
              "type": "string",
              "flags": "",
              "definition": "Withdraw or deposit for Call Deposit.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CallAccount",
              "type": "string",
              "flags": "",
              "definition": "The account which is being withdrawn from or deposited to.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Currency",
              "type": "string",
              "flags": "",
              "definition": "The currency in which the trade is made.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "MaturityDate",
              "type": "date",
              "flags": "",
              "definition": "The maturity date of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "MaturityTenor",
              "type": "string",
              "flags": "",
              "definition": "The maturity tenor of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "StartDate",
              "type": "date",
              "flags": "",
              "definition": "The start date of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "StartTenor",
              "type": "string",
              "flags": "",
              "definition": "The start tenor of the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "TradeID",
              "type": "string",
              "flags": "",
              "definition": "The unique id identifying the trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PrincipalAmount",
              "type": "decimal",
              "flags": "",
              "definition": "The original amount that the trade was created with specified in the provided Currency.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestRate",
              "type": "decimal",
              "flags": "",
              "definition": "Interest rate on the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "IndicativeProfitRate",
              "type": "string",
              "flags": "",
              "definition": "Indicative profit rate on the given PrincipalAmount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestRateDPS",
              "type": "decimal",
              "flags": "",
              "definition": "The precision for a specified InterestRate.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "InterestAmount",
              "type": "decimal",
              "flags": "",
              "definition": "Interest amount (specified in the provided Currency) calculated from the interest rate and principal amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PrincipalPlusInterest",
              "type": "decimal",
              "flags": "",
              "definition": "Composite amount between principal amount and interest amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "PaymentFrequency",
              "type": "string",
              "flags": "",
              "definition": "Interest payment frequencies for term deposits, this could be ZERO-COUPON, MONTHLY, QUARTERLY, SEMI-ANNUALLY or ANNUALLY.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "AllocationMode",
              "type": "string",
              "flags": "",
              "definition": "Determines whether the amount will be alLocated to a single or multiple accounts. Supported types are [SINGLE, MULTIPLE] and is defaulted to SINGLE.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "NumberOfDays",
              "type": "string",
              "flags": "",
              "definition": "The number of days between the start and maturity dates.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "ExecutionDateTime",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160322123621",
              "deprecated": false
            },
            {
              "name": "EntityId",
              "type": "string",
              "flags": "",
              "definition": "The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE. If this field is absent on a leg then the default entity should be presumed.",
              "example_value": "CUSTONE",
              "deprecated": false
            },
            {
              "name": "EntityDescription",
              "type": "string",
              "flags": "",
              "definition": "The description of a trade on behalf of entity.",
              "example_value": "Customer 1",
              "deprecated": false
            },
            {
              "name": "TradeDate",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160314",
              "deprecated": false
            },
            {
              "name": "TradingType",
              "type": "string",
              "flags": "",
              "definition": "The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "QuoteID",
              "type": "string",
              "flags": "",
              "definition": "Unique id for a quote, used to determine which quote has been used for trade execution.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "QuoteDateTime",
              "type": "string",
              "flags": "",
              "definition": "",
              "example_value": "20160314013000",
              "deprecated": false
            },
            {
              "name": "CanAffirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Affirm the Trade Details are as agreed.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "DisplayFields",
              "type": "string",
              "flags": "",
              "definition": "Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
              "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
              "deprecated": false
            },
            {
              "name": "CanCapitalIncrease",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Capital Increase the Trade amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanRollOver",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Roll Over the Trade amount.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanChangeSSI",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Change the Settlement Instructions.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "CanGiveNotice",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Give notice for Money Market trades.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "HasPostTradeHistory",
              "type": "boolean",
              "flags": "",
              "definition": "Define whether post-trade history (related deals) is available.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "NoticePeriodDescription",
              "type": "string",
              "flags": "",
              "definition": "The notice period description for the trade, sent as the raw display value or a translation token.",
              "example_value": "32 Days",
              "deprecated": false
            },
            {
              "name": "NoticePeriod",
              "type": "string",
              "flags": "",
              "definition": "The notice period for the trade.",
              "example_value": "32D",
              "deprecated": false
            },
            {
              "name": "IsShariaTrade",
              "type": "boolean",
              "flags": "",
              "definition": "Indicates whether the trade is a Sharia trade",
              "example_value": "true",
              "deprecated": false
            },
            {
              "name": "CanConfirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Confirm the Settlement Details are now final.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "ConfirmedBy",
              "type": "string",
              "flags": "",
              "definition": "The name of the user who confirmed a trade.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Tags",
              "type": "string",
              "flags": "",
              "definition": "Tags for a trade.",
              "example_value": "method={'import':'static com.caplin.motif.fx.config.definitions.common.Tag','name':'Arrays.asList'}",
              "deprecated": false
            },
            {
              "name": "ConfirmedDateTime",
              "type": "datetime",
              "flags": "",
              "definition": "The time at which a trade was confirmed in ISO-8601 format",
              "example_value": "2018-03-16T07:25:16+00:00",
              "deprecated": false
            },
            {
              "name": "CanUnwind",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Unwind the Trade amount.",
              "example_value": "true",
              "deprecated": false
            },
            {
              "name": "Fees",
              "type": "decimal",
              "flags": "",
              "definition": "Fees on the given PrincipalAmount for unwind.",
              "example_value": "10.0",
              "deprecated": false
            },
            {
              "name": "ParentTradeID",
              "type": "string",
              "flags": "",
              "definition": "The unique id identifying the parent trade of this trade in the case of post trade workflows.",
              "example_value": "00002456",
              "deprecated": false
            },
            {
              "name": "NoticeGiven",
              "type": "boolean",
              "flags": "",
              "definition": "Reflects if notice has been given.",
              "example_value": "true",
              "deprecated": false
            }
          ]
        },
        {
          "part_name": "SettlementTradeFields",
          "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementTradeFields",
          "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementTradeFields.html",
          "parts": [
            {
              "part_name": "SettlementFields",
              "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementFields",
              "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementFields.html",
              "fields": [
                {
                  "name": "Un_PaySettlementId",
                  "type": "string",
                  "flags": "",
                  "definition": "The identifier for the settlement instruction.",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PayIsDefaultSettlementInstruction",
                  "type": "boolean",
                  "flags": "",
                  "definition": "Is this the default settlement instruction for this currency",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementInstructionType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]",
                  "example_value": "EXISTING",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]",
                  "example_value": "PRINCIPAL",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementRemarks",
                  "type": "string",
                  "flags": "",
                  "definition": "The remarks corresponding to the settlement details",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_PaySettlementDisplayName",
                  "type": "string",
                  "flags": "",
                  "definition": "The name of the settlement instruction. This field can be omitted.",
                  "example_value": "[CCY] Account 1",
                  "deprecated": false
                }
              ]
            },
            {
              "part_name": "SettlementFields",
              "java_class": "com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef.SettlementFields",
              "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/settlementinstructions/SettlementInstructionsPartsDef.SettlementFields.html",
              "fields": [
                {
                  "name": "Un_ReceiveSettlementId",
                  "type": "string",
                  "flags": "",
                  "definition": "The identifier for the settlement instruction.",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveIsDefaultSettlementInstruction",
                  "type": "boolean",
                  "flags": "",
                  "definition": "Is this the default settlement instruction for this currency",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementInstructionType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]",
                  "example_value": "EXISTING",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementType",
                  "type": "string",
                  "flags": "",
                  "definition": "The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]",
                  "example_value": "PRINCIPAL",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementRemarks",
                  "type": "string",
                  "flags": "",
                  "definition": "The remarks corresponding to the settlement details",
                  "example_value": "",
                  "deprecated": false
                },
                {
                  "name": "Un_ReceiveSettlementDisplayName",
                  "type": "string",
                  "flags": "",
                  "definition": "The name of the settlement instruction. This field can be omitted.",
                  "example_value": "[CCY] Account 1",
                  "deprecated": false
                }
              ]
            }
          ],
          "fields": [
            {
              "name": "Un_CanAffirm",
              "type": "boolean",
              "flags": "",
              "definition": "Ability to Affirm the Trade Details are as agreed.",
              "example_value": "",
              "deprecated": false
            },
            {
              "name": "Un_IsReceiveInterestSplit",
              "type": "boolean",
              "flags": "",
              "definition": "Whether the receive Settlement Instruction has been split into separate Principal and Interest instructions.",
              "example_value": "",
              "deprecated": false
            }
          ]
        }
      ]
    },
    {
      "part_name": "SalesCommonTradeConfirmationFields",
      "java_class": "com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef.SalesCommonTradeConfirmationFields",
      "javadoc": "https://docs.caplin.com/developer/api/fxintegration/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfPartsDef.SalesCommonTradeConfirmationFields.html",
      "fields": [
        {
          "name": "TraderInterestRate",
          "type": "decimal",
          "flags": "",
          "definition": "Interest rate on the given PrincipalAmount with no client margin applied to it.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "InterestMargin",
          "type": "decimal",
          "flags": "Editable",
          "definition": "Interest margin on the given InterestRate.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "StreamingMode",
          "type": "string",
          "flags": "",
          "definition": "Indicates whether the rates/margins of this trade have been manually set",
          "example_value": "MANUAL, STREAMING",
          "deprecated": false
        },
        {
          "name": "Profit",
          "type": "decimal",
          "flags": "",
          "definition": "The sales profit in the specified currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitCurrency",
          "type": "string",
          "flags": "",
          "definition": "The profit currency that the ProfitRate is being provided for.",
          "example_value": "USD",
          "deprecated": false
        },
        {
          "name": "ProfitCurrencyDPS",
          "type": "integer",
          "flags": "",
          "definition": "The number of decimal places that should be used for formatting the amount in profit currency field.",
          "example_value": "2",
          "deprecated": false
        },
        {
          "name": "ProfitIsHouse",
          "type": "boolean",
          "flags": "",
          "definition": "Whether the field ProfitCurrency is the system/house currency or not.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "ProfitRate",
          "type": "decimal",
          "flags": "",
          "definition": "The conversion rate between the contra currency and the profit currency. This can be used for entering profit in an amount of settlement currency.",
          "example_value": "",
          "deprecated": false
        },
        {
          "name": "TradeStatus",
          "type": "string",
          "flags": "",
          "definition": "The current status of the trade. Supported types are [AWAITING-TRADER, AWAITING-PRICE, PRICED, EXECUTING, CLOSED, REJECTED, ERRORED, COMPLETED]. CLOSED means the client cancelled the trade request, REJECTED indicates it was rejected by the dealer.",
          "example_value": "AWAITING-PRICE",
          "deprecated": false
        },
        {
          "name": "Reasons",
          "type": "string",
          "flags": "",
          "definition": "A JSON structure containing all the reasons and information about why the trade requires intervention. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultReasonsHeaderDisplayFields','name':'addDefaultReasonsHeaderDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        },
        {
          "name": "DisplayFields",
          "type": "string",
          "flags": "",
          "definition": "Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.",
          "example_value": "method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}",
          "deprecated": false
        }
      ]
    }
  ]
}
```

Java class: [com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef.SalesTradeConfirmation](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/generated/motif/mm/tradeconfirmation/TradeConfTypesDef.SalesTradeConfirmation.html)

Instantiation pattern: Static Factory Method (via `TradeConfTypesDef.SalesTradeConfirmation.newBuilder()`)

Java code example:

```java
package com.caplin.examples.fxapi.generated.motif.mm.tradeconfirmation.TradeConfTypesDef; 

import java.math.BigInteger;
import static com.caplin.motif.fx.config.DefaultDisplayFields.addDefaultSalesAllocationDetailsUpdateFields;
import static com.caplin.motif.fx.config.definitions.common.Tag;

import com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef;

public class SalesTradeConfirmationExample {
    public static void main(String[] args) {
                    		
		TradeConfTypesDef.SalesTradeConfirmation salesTradeConfirmation =
		TradeConfTypesDef.SalesTradeConfirmation
			.newBuilder()
			.setSalesCommonFields(
			TradeConfPartsDef.SalesCommonTradeConfirmationFields
				.newBuilder()
				.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
				.setInterestMargin(BigDecimal.valueOf(0.0), true)
				.setInterestMarginEditable()
				.setProfit(BigDecimal.valueOf(1000))
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS(5)
				.setProfitIsHouse(true)
				.setProfitRate("1.091790")
				.setReasons(arg)
				.setStreamingMode("MANUAL, STREAMING")
				.setTradeStatus("AWAITING-PRICE")
				.setTraderInterestRate("")
				.build())
			.setTradeConfirmation(
			TradeConfTypesDef.TradeConfirmation
				.newBuilder()
				.addSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.setCanAffirm(true)
					.setIsReceiveInterestSplit("")
					.setPay(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.setIsDefaultSettlementInstruction("")
						.setSettlementDisplayName("[CCY] Account 1")
						.setSettlementId("")
						.setSettlementInstructionType("EXISTING")
						.setSettlementRemarks("")
						.setSettlementType("")
						.build())
					.setReceive(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.build())
					.build())
				.setCommonFields(
				TradeConfPartsDef.CommonTradeConfirmationFields
					.newBuilder()
					.setAccount("Garfields|GARF")
					.setAction("")
					.setAllocationMode("")
					.setCallAccount("")
					.setCanAffirm(true)
					.setCanCapitalIncrease("")
					.setCanChangeSSI(true)
					.setCanConfirm("")
					.setCanGiveNotice("")
					.setCanRollOver(true)
					.setCanUnwind("")
					.setConfirmedBy("")
					.setConfirmedDateTime("2018-03-16T07:25:16+00:00")
					.setCurrency("USD")
					.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
					.setEntityDescription("Customer 1")
					.setEntityId("CUSTONE")
					.setExecutionDateTime("20160322123621")
					.setExtraFields("")
					.setFees("")
					.setHasPostTradeHistory("")
					.setIndicativeProfitRate("")
					.setInterestAmount(BigDecimal.valueOf(0.0))
					.setInterestRate(BigDecimal.valueOf(0.0))
					.setInterestRateDPS("")
					.setIsShariaTrade("")
					.setMaturityDate(LocalDate.now())
					.setMaturityTenor("")
					.setNoticeGiven("")
					.setNoticePeriod("")
					.setNoticePeriodDescription("")
					.setNumberOfDays("")
					.setParentTradeID("")
					.setPaymentFrequency("")
					.setPrincipalAmount(BigDecimal.valueOf(0.0))
					.setPrincipalPlusInterest("")
					.setQuoteDateTime("")
					.setQuoteID("")
					.setStartDate(LocalDate.now())
					.setStartTenor("1W")
					.setTOBOUser("client@customer.co.za")
					.setTags(Arrays.asList(/* ... */))
					.setTradeDate("20160314")
					.setTradeID("00001561")
					.setTraderUsername("sales_trader@novobank.co.za")
					.setTradingType("SPOT")
					.build())
				.setSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.build(), 0)
				.build())
			.build();
            
    }
}
```

### Event: WithdrawAck (server)

Message specification:

```json
{
  "trade_model_name": "MMSalesIntervention",
  "trade_model_trigger": "WithdrawAck",
  "message_origin": "server"
}
```