Trade model: MMRFS

This page describes the FX Integration API’s MMRFS 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 3.58.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 MMRFS trade model is shown below. To simplify the diagram, the Rejected and Error states have been omitted.

InitialSubmittedQueuedClientCloseSentExpiredPickedUpClientClosedExecutableExecuteSentExecutedWarningSentTradeConfirmedAcceptWarningSentSubmitSubmitAckClientCloseExpireClientClosePickUpHoldClientCloseAckPriceUpdateWithdrawClientCloseExpireExecutePriceUpdateResubmitClientCloseExecuteAckPriceUpdateWarningExpireTradeConfirmationAcceptWarningRejectWarningClientCloseAcceptWarningAckLegendTransitions 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
Execute
Execution
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].
InterestRate
decimal
Interest rate on the given PrincipalAmount.
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.
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
Submission
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].
NumberOfDays
string
The number of days between the start and maturity dates.
StartDate
date
The start date of the trade.
MaturityDate
date
The maturity date of the trade.
MsgType
String
Example: Resubmit
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Submit
Trade
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
Submission
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].
NumberOfDays
string
The number of days between the start and maturity dates.
StartDate
date
The start date of the trade.
MaturityDate
date
The maturity date of the trade.

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
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.
DepositInterestRate
decimal
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.
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.
Currency
string
The currency in which the trade is made.
MaturityDate
date
The maturity date of the trade.
StartDate
date
The start date 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.
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.
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].
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.
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