Trade model: Order Change State

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

This documentation is for the FX Integration API 3.36.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 Order Change State trade model is shown below. To simplify the diagram, the Timeout and Error states have been omitted.

InitialChangeStateSentChangingStateDoneRejectedPendingChangeStateChangeStateAckChangeStateConfirmChangeStateRejectChangeStatePendingCancelWaitLegendTransitions 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.

ChangeState
MsgType
String
Example: ChangeState
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
OrderID
string
The id of the order.
NewState
The new state that we would like the order to switch to, e.g. Active, Inactive
CancelWait
MsgType
String
Example: CancelWait
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

Trade-channel messages sent by the FX API DataSource to StreamLink clients.

ChangeStateAck
MsgType
String
Example: ChangeStateAck
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ChangeStateConfirm
MsgType
String
Example: ChangeStateConfirm
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ChangeStateReject
MsgType
String
Example: ChangeStateReject
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model
ChangeStatePending
MsgType
String
Example: ChangeStatePending
Name of the transition
RequestID
String
The RequestID. A Unique identifier, must remain the same for each event in the trade model