Trade model: MMPostTrade

This page describes the FX Integration API’s MMPostTrade trade model, as defined in the file config/MoneyMarketsTradingAdapter/Blade/DataSource/etc/trademodels.xml in the FX Integration API Kit.

This documentation is for the FX Integration API 8.13.0.

Trade models are XML-defined state machines used by the Java Trading API, the C Trading API, and Caplin Trader’s Trading API to manage trading workflows. For more information on trade model XML definitions, see the Trade model XML schema reference.

State diagram

The state diagram for the MMPostTrade trade model is shown below. To simplify the diagram, the Rejected and Error states have been omitted.

InitialDetailsRequestedDetailsProvidedClientCloseSentSubmittedQueuedTradeConfirmedExpiredPickedUpClientClosedExecutableExecuteSentExecutedWarningSentAcceptWarningSentDetailsRequestDetailsUpdateClientCloseSubmitClientCloseSubmitAckTradeConfirmationExpireClientClosePickUpHoldClientCloseAckPriceUpdateWithdrawClientCloseExpireExecutePriceUpdateResubmitClientCloseExecuteAckPriceUpdateWarningExpireTradeConfirmationAcceptWarningRejectWarningClientCloseAcceptWarningAckLegendTransitions initiated by the client are inyellow.Transitions initiated by the server are inblue.

Messages: client → server

Messages sent by StreamLink clients to the FX API DataSource.

For high-level information on message fields, see Message and record fields. For information about fields in specific messages, see the message specifications below.

AcceptWarning
MsgType
String
Example: AcceptWarning
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ClientClose
MsgType
String
Example: ClientClose
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
DetailsRequest
MsgType
String
Example: DetailsRequest
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
TradeID
string
The unique id identifying the trade.
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
PostTradeType
The type of post trade action, this could be ROLL_OVER
Execute
Execution
SettlementLeg Un
Un_PaySettlementId
The Id corresponding to the payee's settlement details.
Un_PaySettlementRemarks
The remarks corresponding to the payee's settlement details.
Un_PaySettlementInstructionType
The type of settlement instruction on the pay side.
Un_ReceiveSettlementId
The Id corresponding to the recipient's settlement details.
Un_ReceiveSettlementRemarks
The remarks corresponding to the recipient's settlement details.
Un_ReceiveSettlementInstructionType
The type of settlement instruction on the receive side.
Un_ReceiveSettlementType
The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST].
QuoteID
string
Unique id for a quote, used to determine which quote has been used for trade execution.
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
InterestRate
decimal
Interest rate on the given PrincipalAmount.
InterestMargin
decimal
Interest margin on the given InterestRate.
InterestAmount
decimal
Interest amount (specified in the provided Currency) calculated from the interest rate and principal amount.
PrincipalPlusInterest
decimal
Composite amount between principal amount and interest amount.
AppID
A unique identifier for the client application
MsgType
String
Example: Execute
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
RejectWarning
MsgType
String
Example: RejectWarning
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Resubmit
MMRFSSubmission
SettlementLeg Un
Un_PaySettlementId
The Id corresponding to the payee's settlement details.
Un_PaySettlementRemarks
The remarks corresponding to the payee's settlement details.
Un_PaySettlementInstructionType
The type of settlement instruction on the pay side.
Un_ReceiveSettlementId
The Id corresponding to the recipient's settlement details.
Un_ReceiveSettlementRemarks
The remarks corresponding to the recipient's settlement details.
Un_ReceiveSettlementInstructionType
The type of settlement instruction on the receive side.
Un_ReceiveSettlementType
The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST].
TOBOUser
string
The client who the trade is for.
Account
string
The used account for the trade.
PrincipalAmount
decimal
Principal amount for the trade specified in the provided Currency.
Currency
string
The currency in which the trade is made.
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
NumberOfDays
string
The number of days between the start and maturity dates.
StartDate
date
The start date of the trade.
StartTenor
string
The start tenor of the trade.
MaturityDate
date
The maturity date of the trade.
MaturityTenor
string
The maturity tenor of the trade.
PaymentFrequency
string
Interest payment frequencies for term deposits, this could be ZERO-COUPON, MONTHLY, QUARTERLY, SEMI-ANNUALLY or ANNUALLY.
Action
string
Withdraw or deposit for Call Deposit.
CallAccount
string
The account which is being withdrawn from or deposited to.
ShariaTrade
Boolean that describes whether a MM trade is a Sharia trade or not.
NoticePeriod
string
Example: 32D
The notice period for the trade.
AppID
A unique identifier for the client application
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
AssetClass
TradingProtocol
TradingSubProtocol
TransactionType
MsgType
String
The name of the transition
State
This message has no fields that you can set.
Submit
MMRFSSubmission
SettlementLeg Un
Un_PaySettlementId
The Id corresponding to the payee's settlement details.
Un_PaySettlementRemarks
The remarks corresponding to the payee's settlement details.
Un_PaySettlementInstructionType
The type of settlement instruction on the pay side.
Un_ReceiveSettlementId
The Id corresponding to the recipient's settlement details.
Un_ReceiveSettlementRemarks
The remarks corresponding to the recipient's settlement details.
Un_ReceiveSettlementInstructionType
The type of settlement instruction on the receive side.
Un_ReceiveSettlementType
The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST].
TOBOUser
string
The client who the trade is for.
Account
string
The used account for the trade.
PrincipalAmount
decimal
Principal amount for the trade specified in the provided Currency.
Currency
string
The currency in which the trade is made.
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
NumberOfDays
string
The number of days between the start and maturity dates.
StartDate
date
The start date of the trade.
StartTenor
string
The start tenor of the trade.
MaturityDate
date
The maturity date of the trade.
MaturityTenor
string
The maturity tenor of the trade.
PaymentFrequency
string
Interest payment frequencies for term deposits, this could be ZERO-COUPON, MONTHLY, QUARTERLY, SEMI-ANNUALLY or ANNUALLY.
Action
string
Withdraw or deposit for Call Deposit.
CallAccount
string
The account which is being withdrawn from or deposited to.
ShariaTrade
Boolean that describes whether a MM trade is a Sharia trade or not.
NoticePeriod
string
Example: 32D
The notice period for the trade.
AppID
A unique identifier for the client application
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
AssetClass
TradingProtocol
TradingSubProtocol
TransactionType
MsgType
String
The name of the transition
State
This message has no fields that you can set.

Messages: server → client

Messages sent by the FX API DataSource to StreamLink clients.

For high-level information on message fields, see Message and record fields. For information about fields in specific messages, see the message specifications below.

AcceptWarningAck
MsgType
String
Example: AcceptWarningAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ClientCloseAck
MsgType
String
Example: ClientCloseAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
DetailsUpdate Post Trade
PostTradeFields
TradeID
string
The unique id identifying the trade.
OriginalAmount
decimal
The original principal amount for the trade in capital increase.
PrincipalAmount
decimal
Principal amount for the trade specified in the provided Currency.
StartDate
date
The start date of the trade.
MaturityDate
date
The maturity date of the trade.
NumberOfDays
string
The number of days between the start and maturity dates.
InterestRate
decimal
Interest rate on the given PrincipalAmount.
InterestRateDPS
decimal
The precision for a specified InterestRate.
Currency
string
The currency in which the trade is made.
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
IncreasedAmount
decimal
The increased principal amount for the trade in capital increase.
RolledAmount
decimal
The rolled principal amount for the trade in roll over.
NoticePeriodDescription
string
Example: 32 Days
The notice period description for the trade, sent as the raw display value or a translation token.
TOBOUser
string
The client who the trade is for.
Account
string
The used account for the trade.
IsShariaTrade
boolean
Example: true
Indicates whether the trade is a Sharia trade
This message has no fields that you can set.
Error
MsgType
String
Example: Error
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ExecuteAck
MsgType
String
Example: ExecuteAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Expire
MsgType
String
Example: Expire
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Hold
MsgType
String
Example: Hold
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
PickUp
MsgType
String
Example: PickUp
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
PriceUpdate Quote
CommonFields
LoanQuoteID
string
Unique id for a loan quote, used to determine which quote has been used for trade execution.
DepositQuoteID
string
Unique id for a deposit quote, used to determine which quote has been used for trade execution.
LoanInterestRate
decimal
Interest rate on loaning the given PrincipalAmount.
InterestRateDPS
decimal
The precision for a specified InterestRate.
DepositInterestRate
decimal
Interest rate on depositing the given PrincipalAmount.
DepositClientInterestRate
decimal
Example: 5.04
Client interest rate on depositing the given PrincipalAmount.
LoanInterestAmount
decimal
Interest amount (specified in the provided Currency) calculated from the loan interest rate and principal amount
DepositInterestAmount
decimal
Interest amount (specified in the provided Currency) calculated from the deposit interest rate and principal amount
LoanPrincipalPlusInterest
decimal
Composite amount between principal amount and loan interest amount.
DepositPrincipalPlusInterest
decimal
Composite amount between principal amount and deposit interest amount.
OverallTimeout
integer
The amount in seconds in which the trade will expire.
RemainingTimeOutMillis
integer
The number of milliseconds remaining of the OverallTimeOut before this stream is timed out. This is not present for standard price updates.
This message has no fields that you can set.
Reject
MsgType
String
Example: Reject
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
SubmitAck
MsgType
String
Example: SubmitAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
TradeConfirmation
CommonTradeConfirmationFields
TOBOUser
string
The client who the trade is for.
TraderUsername
string
The name of the trader providing the price to the user, or NO_TRADER if there is none.
Account
string
The used account for the trade.
Action
string
Withdraw or deposit for Call Deposit.
CallAccount
string
The account which is being withdrawn from or deposited to.
Currency
string
The currency in which the trade is made.
MaturityDate
date
The maturity date of the trade.
MaturityTenor
string
The maturity tenor of the trade.
StartDate
date
The start date of the trade.
StartTenor
string
The start tenor of the trade.
TradeID
string
The unique id identifying the trade.
PrincipalAmount
decimal
Principal amount for the trade specified in the provided Currency.
InterestRate
decimal
Interest rate on the given PrincipalAmount.
IndicativeProfitRate
string
Indicative profit rate on the given PrincipalAmount.
InterestRateDPS
decimal
The precision for a specified InterestRate.
InterestAmount
decimal
Interest amount (specified in the provided Currency) calculated from the interest rate and principal amount.
PrincipalPlusInterest
decimal
Composite amount between principal amount and interest amount.
PaymentFrequency
string
Interest payment frequencies for term deposits, this could be ZERO-COUPON, MONTHLY, QUARTERLY, SEMI-ANNUALLY or ANNUALLY.
AllocationMode
string
Determines whether the amount will be alLocated to a single or multiple accounts. Supported types are [SINGLE, MULTIPLE] and is defaulted to SINGLE.
NumberOfDays
string
The number of days between the start and maturity dates.
ExecutionDateTime
string
Example: 20160322123621
EntityId
string
Example: CUSTONE
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.
EntityDescription
string
Example: Customer 1
The description of a trade on behalf of entity.
TradeDate
string
Example: 20160314
TradingType
string
The type of the trade. Supported types are [LOAN, DEPOSIT, CALL-DEPOSIT, TERM-DEPOSIT, FLEXI-NOTICE-DEPOSIT, TREASURY-BILL or GOVERNMENT-BOND].
QuoteID
string
Unique id for a quote, used to determine which quote has been used for trade execution.
QuoteDateTime
string
Example: 20160314013000
CanAffirm
boolean
Ability to Affirm the Trade Details are as agreed.
DisplayFields
string
Example: method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}
Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.
CanCapitalIncrease
boolean
Ability to Capital Increase the Trade amount.
CanRollOver
boolean
Ability to Roll Over the Trade amount.
CanChangeSSI
boolean
Ability to Change the Settlement Instructions.
CanGiveNotice
boolean
Ability to Give notice for Money Market trades.
HasPostTradeHistory
boolean
Define whether post-trade history (related deals) is available.
NoticePeriodDescription
string
Example: 32 Days
The notice period description for the trade, sent as the raw display value or a translation token.
NoticePeriod
string
Example: 32D
The notice period for the trade.
IsShariaTrade
boolean
Example: true
Indicates whether the trade is a Sharia trade
CanConfirm
boolean
Ability to Confirm the Settlement Details are now final.
ConfirmedBy
string
The name of the user who confirmed a trade.
Tags
string
Example: method={'import':'static com.caplin.motif.fx.config.definitions.common.Tag','name':'Arrays.asList'}
Tags for a trade.
ConfirmedDateTime
datetime
Example: 2018-03-16T07:25:16+00:00
The time at which a trade was confirmed in ISO-8601 format
SettlementTradeFields Un
SettlementFields Un_Pay
Un_PaySettlementId
string
The identifier for the settlement instruction.
Un_PayIsDefaultSettlementInstruction
boolean
Is this the default settlement instruction for this currency
Un_PaySettlementInstructionType
string
Example: EXISTING
The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]
Un_PaySettlementType
string
Example: PRINCIPAL
The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]
Un_PaySettlementRemarks
string
The remarks corresponding to the settlement details
Un_PaySettlementDisplayName
string
Example: [CCY] Account 1
The name of the settlement instruction. This field can be omitted.
SettlementFields Un_Receive
Un_ReceiveSettlementId
string
The identifier for the settlement instruction.
Un_ReceiveIsDefaultSettlementInstruction
boolean
Is this the default settlement instruction for this currency
Un_ReceiveSettlementInstructionType
string
Example: EXISTING
The type of settlement instruction attached to a trade. Supported types are [EXISTING, ADHOC, NONE]
Un_ReceiveSettlementType
string
Example: PRINCIPAL
The type of settlement attached to a trade. Supported types are [PRINCIPAL, INTEREST]
Un_ReceiveSettlementRemarks
string
The remarks corresponding to the settlement details
Un_ReceiveSettlementDisplayName
string
Example: [CCY] Account 1
The name of the settlement instruction. This field can be omitted.
Un_CanAffirm
boolean
Ability to Affirm the Trade Details are as agreed.
Un_IsReceiveInterestSplit
boolean
Whether the receive Settlement Instruction has been split into separate Principal and Interest instructions.
This message has no fields that you can set.
Warning
MsgType
String
Example: Warning
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Withdraw
MsgType
String
Example: Withdraw
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model