Trade model: Time Option Drawdown

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

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

Messages: client → server

Trade-channel 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.

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
Example: 00001561
A unique identifier for this trade
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
Submit
DrawdownSubmission
DrawdownSubmissionLeg Ln
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_SettlementDate
string
Ln_Tenor
string
Example: 1M
Supported types are [ON, [TODAY, TOD, TD], TN, [TOM, ND], SPOT, SN, 1D, 1W, 2W, 3W, 4W, 1M, 2M, 4M, 5M, 6M, 7M, 8M, 9M, 10M, 11M, [1Y, 12M], 15M, 18M, 21M, [2Y, 24M], [3Y, 36M], [4Y, 48M], [5Y, 60M], broken]. 'broken' indicates that the settlement date does not fall onto a tenor.
TradeID
string
Example: 00001561
A unique identifier for this trade
MsgType
String
Example: Submit
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model

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.

DetailsUpdate Drawdown Details
DrawdownDetailsLegFields Ln
Ln_AllInRate
decimal
Example: 1.091790
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_BuySell
string
The direction of the trade or trade leg, from the client's perspective. This always refers to the BaseCurrency, NOT the DealtCurrency.
Ln_RemainingAmount
decimal
Example: 500
Ln_StartDate
string
Example: 20150620
Ln_StartTenor
string
Example: 1W
Ln_SettlementDate
string
Ln_Tenor
string
Example: 1M
Supported types are [ON, [TODAY, TOD, TD], TN, [TOM, ND], SPOT, SN, 1D, 1W, 2W, 3W, 4W, 1M, 2M, 4M, 5M, 6M, 7M, 8M, 9M, 10M, 11M, [1Y, 12M], 15M, 18M, 21M, [2Y, 24M], [3Y, 36M], [4Y, 48M], [5Y, 60M], broken]. 'broken' indicates that the settlement date does not fall onto a tenor.
TradeID
string
Example: 00001561
A unique identifier for this trade
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
DealtCurrency
string
Example: GBP
The currency of the Amount of a trade or order.
DisplayFields
string
Example: method={'import':'static com.caplin.motif.fx.config.DefaultDisplayFields.addDefaultSalesAllocationDetailsUpdateFields','name':'addDefaultSalesAllocationDetailsUpdateFields','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.
Complete Drawdown Confirmation
DrawdownConfirmationLegFields Ln
Ln_Amount
decimal
The amount of a trade or order in the DealtCurrency.
Ln_ContraAmount
decimal
Example: 350
The amount that is exchanged for the Amount. This will be defined in the contra currency of the DealtCurrency.
Ln_SettlementDate
string
RemainingAmount
decimal
Example: 500
CurrencyPair
string
The currency pair for the trade. For example, EURUSD
DealtCurrency
string
Example: GBP
The currency of the Amount of a trade or order.
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