Trade model: Cancel

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

InitialSubmittedPendingDetailsQueuedConfirmedPendingAcceptClientRejectedSubmitRequestDetailsDetailsSubmitAckProcessingConfirmDetailsDetailsClientAcceptClientReject

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.

ClientAccept
MsgType
String
Example: ClientAccept
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ClientReject
MsgType
String
Example: ClientReject
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
RequestDetails
MsgType
String
Example: RequestDetails
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
Submit
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
TradeID
string
Example: 00001561
A unique identifier for this trade

Messages: server → client

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

Confirm
MsgType
String
Example: Confirm
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
Details Cancel Trade Details
ProfitLossAmount
decimal
The profit/loss of the trade at execution time.
ProfitLossCurrency
decimal
The currency the profit/loss of the trade is provided in.
CancellationProfitLossAmount
decimal
The estimated profit/loss of this cancellation.
CancellationProfitLossCurrency
decimal
The currency the estimated profit/loss of this cancellation is provided in.
Processing
MsgType
String
Example: Processing
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