com.teraspaces.qwfix.ordermanager
Class FIXRegularOrder

java.lang.Object
  extended by com.teraspaces.qwfix.ordermanager.FIXOrder
      extended by com.teraspaces.qwfix.ordermanager.FIXRegularOrder

public final class FIXRegularOrder
extends FIXOrder

A regular order is a FIXOrder with a FIXOrderType as SINGLE, MULTILEG, CROSS_POPULATED or LIST_POPULATED.


Method Summary
 void addCancelReject(FIXMessage cxlRejMessage)
          Adds a "Cancel Reject" message to the current order by sending it to the counter party.
 void addExecution(FIXMessage execMessage)
          Adds an execution report message to order.
 void addOrderCancelRequest(FIXMessage cancelRequest)
          Adds a pending cancel order message to the current order by sending it to the counter party.
 void addOrderReplaceRequest(FIXMessage replaceRequest)
          Adds a pending replace order message to the current order by sending it to the counter party.
 void addOrderStatusRequest(FIXMessage statusReqMessage)
          Adds a status request message to the current order by sending it to the counter party.
 FIXMessage CreateCancelExecution(FIXMessage refExecution, char newExecType, char newOrdStatus)
          Create an "Execution Report" FIX message that busts a previous execution.
 FIXMessage createCorrectExecution(FIXMessage refExecution, char newExecType, char newOrdStatus)
          Create an "Execution Report" FIX message that busts a previous execution.
 FIXMessage createNewExecutionAcceptedForBidding()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=AcceptedForBidding.
 FIXMessage createNewExecutionCalculated()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Calculated.
 FIXMessage createNewExecutionCanceled(FIXMessageComponent pendingOrder)
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Canceled.
 FIXMessage createNewExecutionDoneForDay()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=DoneForDay.
 FIXMessage createNewExecutionExpired()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Expired.
 FIXMessage createNewExecutionFilled()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Filled.
 FIXMessage createNewExecutionNew()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=New.
 FIXMessage createNewExecutionPartiallyFilled()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=PartiallyFilled.
 FIXMessage createNewExecutionPendingCancel(FIXMessageComponent pendingOrder)
          Create an "Execution Report" FIX message with ExecType=PendingCancel and OrdStatus=PendingCancel.
 FIXMessage createNewExecutionPendingNew()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=PengingNew.
 FIXMessage createNewExecutionPendingReplace(FIXMessageComponent pendingOrder)
          Create an "Execution Report" FIX message with ExecType=PendingReplace and OrdStatus=PendingReplace.
 FIXMessage createNewExecutionRejected(int ordRejReason)
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Rejected.
 FIXMessage createNewExecutionReplaced(FIXMessageComponent pendingOrder, boolean filled)
          Create an "Execution Report" FIX message with ExecType=Replace.
 FIXMessage createNewExecutionRestated()
          Create an "Execution Report" FIX message with ExecType=Restated
 FIXMessage createNewExecutionStoppedNotification()
          Create an "Execution Report" FIX message with ExecType=Stopped and OrdStatus=Stopped.
 FIXMessage createNewExecutionStoppedTrade()
          Create an "Execution Report" FIX message with ExecType=Trade and OrdStatus=Stopped.
 FIXMessage createNewExecutionSuspended()
          Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Suspended.
 FIXMessage createOrderCancelReject(FIXMessageComponent pendingRequest, char newOrdStatus, int cxlRejReason, String text)
          Creates an "Order Cancel Reject" FIX message.
 FIXMessage createOrderCancelRequest()
          Used by buy side application to create a Order Cancel Request FIX message.
 FIXMessage createOrderReplaceRequest()
          Used by buy side application to create a Order Replace Request FIX message.
 FIXMessage createOrderStatusRequest(FIXMessageComponent againstOrder, String ordStatusReqID)
          Used by buy side application to generate Order Status Request FIX message.
 FIXMessage createStatusExecution(FIXMessage statusReqMessage)
          Create an "Execution Report" FIX message with ExecType=Status.
 FIXMessageComponent getCurrentOrder()
          Gets a block of fields representing the information about the current order.
 FIXMessage getCurrentOrderMessage()
          Gets the current order message.
 int getCurrentOrderMessageIndex()
          Gets the index of the current order message in current order.
 int getCurrentOrderSubIndex()
          Gets the index of the current order in the corresponding repeating group of the current order message.
 FIXOrder getDeclaringOrder()
          Gets the FIXListOrder or FIXCrossOrder that declares this order.
 FIXMessage getExecution(String execID)
          Gets an "Execution Report" message by specified ExecID.
 FIXMessageComponent getLastExecution()
          Gets the message component representing the last execution of the current order.
 FIXMessage getLastExecutionMessage()
          Gets the FIX message representing the last execution of the current order.
 FIXMessage getMessage(int index)
          Gets the FIXMessage related to this order by specified index.
 int getMessageCount()
          Gets the number of messages related to the current order.
 int getMessageSubIndex(int index)
          Gets the "sub index" of the message at specified index.
 FIXMessageComponent getOrder(String clOrdID)
          Gets an order by specified ClOrdID from current order.
 char getOrdStatus()
          Gets the OrdStatus of the current order.
 FIXMessageComponent getPendingRequest(int pendingIndex)
          Gets a block of fields representing the information about the pending request at the index specified.
 FIXMessage getPendingRequestMessage(int pendingIndex)
          Gets the pending request FIX message by index.
 int getPendingRequestsCount()
          Gets count of pending request FIX messages.
 FIXMessageComponent getRootOrder()
          Gets the root order component.
 FIXMessage getRootOrderMessage()
          Gets the root order message.
 boolean isActive()
          Gets a value indicating whether the current order is active.
 boolean isPendingCancel()
          Gets a value indicating whether the current order is pending cancel.
 boolean isPendingReplace()
          Gets a value indicating whether the current order is pending replace
 
Methods inherited from class com.teraspaces.qwfix.ordermanager.FIXOrder
getFIXOrderType, getIndex, getSessionOrderList, getSessionOrderManager, getSessionPersistence, getTag, isRestatedGT, setTag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentOrderSubIndex

public int getCurrentOrderSubIndex()
Gets the index of the current order in the corresponding repeating group of the current order message.

Returns:
the index of the current order repeating instance; or -1 if the current order is not populated from list or cross order
See Also:
getCurrentOrderMessageIndex()

getDeclaringOrder

public FIXOrder getDeclaringOrder()
Gets the FIXListOrder or FIXCrossOrder that declares this order.

Returns:
the declaring order; or null if the current FIXOrder.getFIXOrderType() is neither LIST_POPULATED nor CROSS_POPULATED.

isActive

public boolean isActive()
Description copied from class: FIXOrder
Gets a value indicating whether the current order is active.

A FIXRegularOrder is considered active if getOrdStatus() represents an active state.

A FIXCrossOrder is considered active if any side of the order is active.

A FIXListOrder is considered active if any individual order is active.

Specified by:
isActive in class FIXOrder
Returns:
true if the current order is active; otherwise, false

getCurrentOrderMessageIndex

public int getCurrentOrderMessageIndex()
Gets the index of the current order message in current order.

The current order is the current active order. When the current order is being replaced, the replace order won't become the current until the replace request succeeds.

If the order is populated from a "New Order - List" or "New Order - Cross", the message identified by this index is the actual order message (or CrossOrderReplaceRequest or CrossOrderCancelRequest message if the cross order has been modified). To get the current order with correct ClOrdID, use getCurrentOrderSubIndex(), which represents the index of the actual order in the repeating group.

Returns:
the current order message index

isPendingCancel

public boolean isPendingCancel()
Description copied from class: FIXOrder
Gets a value indicating whether the current order is pending cancel.

isPendingCancel() returns true if there is any cancel request in the pending order list.

An order may have more than 1 pending orders. It's up to the high level business logic to decide whether the pending orders should be processed in time order or reverse time order.

Specified by:
isPendingCancel in class FIXOrder
Returns:
true if the current order is pending cancel; otherwise, false
See Also:
FIXOrder.isPendingReplace(), FIXOrder.getPendingRequestsCount(), FIXOrder.getPendingRequestMessage(int)

isPendingReplace

public boolean isPendingReplace()
Description copied from class: FIXOrder
Gets a value indicating whether the current order is pending replace

isPendingReplace() returns true if there is any replace request in the pending order list.

An order may have more than 1 pending orders. It's up to the high level business logic to decide whether the pending orders should be processed in time order or reverse time order.

Specified by:
isPendingReplace in class FIXOrder
Returns:
true if the current order is pending replace; otherwise, false
See Also:
FIXOrder.isPendingCancel(), FIXOrder.getPendingRequestsCount(), FIXOrder.getPendingRequestMessage(int)

getCurrentOrderMessage

public FIXMessage getCurrentOrderMessage()
Gets the current order message.

This property returns this.getMessage(this.getCurrentOrderMessageIndex()).

If the order is populated from a cross order or a list order, the FIXMessage representing the cross (or cross cancel or cross replace) or list order will be returned. In order to get the actual side or order component in the cross or list order, use getCurrentOrder().

CurrentOrderMessage is initially the same as the getRootOrderMessage(), until the order is successfully replaced. Then the CurrentOrderMessage will become the "Order Cancel/Replace Request" or "Cross Order Cancnel/Replace reuqest" message.

Returns:
the current order message
See Also:
getCurrentOrder()

getCurrentOrder

public FIXMessageComponent getCurrentOrder()
Gets a block of fields representing the information about the current order.

Depending on the type of the current order, originally the CurrentOrder may be an instance of FIXMessage with MsgType of "NewOrderSingle", "NewOrderMultileg".

If the current order is populated from a list or cross order. The CurrentOrder returns the FIXMessageRepeatingInstance of the sub order in the list order, or side order in the cross order.

If the current order represents a restated "GT" order, this property returns an "ExecutionReport" message that contains the information about the restated order.

If the order has been successfully replaced, this property returns the corresponding "OrderCancelReplaceRequest", "MultilegOrderCancelReplaceRequest", or the corresponding repeating instance in the "CrossOrderCancelRequest", or "CrossOrderCancelReplaceRequest".

CurrentOrder is initially the same as the getRootOrder(), until the order is successfully replaced. Then the CurrentOrder will become the "Order Cancel/Replace Request" message, or a component in "Cross Order Cancnel/Replace reuqest".

Returns:
the current order

getRootOrderMessage

public FIXMessage getRootOrderMessage()
Gets the root order message.

The RootOrderMessage is usually the first message in the order. It could be an "Execution Report" message if the order is a restated GT order (see FIXOrder.isRestatedGT()).

If the current order is populated from a cross order (FIXOrderType = CrossPopulated) or a list order (FIXOrderType = ListPopulated), the RootOrderMessage is the actual "New Order - List" or "New Order - Cross" message. To get the actual side or order component, use getRootOrder() property.

Returns:
the root order message

getRootOrder

public FIXMessageComponent getRootOrder()
Gets the root order component.

If the current order is populated from a cross order (FIXOrderType = CrossPopulated) or a list order (FIXOrderType = ListPopulated), the RootOrder returns the actual "Side" or "Order" component in the RootOrderMessage; otherwise it returns the same getRootOrderMessage().

Returns:
the root order component

createOrderCancelRequest

public FIXMessage createOrderCancelRequest()
Used by buy side application to create a Order Cancel Request FIX message.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderCancelRequest() if the FIXOrderType is SINGLE; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderCancelRequest() if the FIXOrderType is MULTILEG. FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderCancelRequest() if the FIXOrderType is LIST_POPULATED;

System administrator can modify the tag copy maps in the FIXEnterpriseManager GUI tools.

If this order is populated from a cross order, an RuntimeException will be thrown out. Application should call FIXCrossOrder.createOrderCancelRequest() to create the cancel request.

Field values such as OrigClOrdID, CxlType (for FIX 4.0 only), TransactTime (for FIX4.2+) and ListID (for list populated orders only) will be automatically generated.

Application still needs to fill in some additional tags such as a new ClOrdID.

Application can later call addOrderCancelRequest(FIXMessage) to send this message.

Returns:
the fIX message

createOrderReplaceRequest

public FIXMessage createOrderReplaceRequest()
Used by buy side application to create a Order Replace Request FIX message.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderReplaceRequest() if the FIXOrderType is SINGLE; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderReplaceRequest() if the FIXOrderType is MULTILEG. FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderReplaceRequest() if the FIXOrderType is LIST_POPULATED;

System administrator can modify the tag copy maps in the FIXEnterpriseManager GUI tools.

If this order is populated from a cross order, an RuntimeException will be thrown out. Application should call FIXCrossOrder.createOrderReplaceRequest() to create the replace request.

Field values such as OrigClOrdID, CxlType (for FIX 4.0 only), TransactTime (for FIX4.2+) and ListID (for list populated orders only) will be automatically generated.

Application still needs to fill in some additional tags such as a new ClOrdID.

Application can later call addOrderReplaceRequest(FIXMessage) to send this message.

Returns:
the fIX message

createOrderStatusRequest

public FIXMessage createOrderStatusRequest(FIXMessageComponent againstOrder,
                                           String ordStatusReqID)
Used by buy side application to generate Order Status Request FIX message.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderStatusRequest() if the FIXOrderType is SINGLE; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderStatusRequest() if the FIXOrderType is MULTILEG. FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderStatusRequest() if the FIXOrderType is LIST_POPULATED;

ordStatusReqID may only be used in FIX 4.4+.

Application can later call addOrderStatusRequest(FIXMessage) to send this message.

Parameters:
againstOrder - the order message the status request is against; or null if the order is a list order
ordStatusReqID - the optional OrdStatusReqID field. This parameter will be ignored if it's null or empty
Returns:
an "Order Status Request" FIX message

addOrderCancelRequest

public void addOrderCancelRequest(FIXMessage cancelRequest)
Adds a pending cancel order message to the current order by sending it to the counter party. Should be used by buy side only.

The input cancelRequest message must be created by calling createOrderCancelRequest() on the same order.

This operation can only be performed on a buy side order and the system must be running in a normal production mode. Otherwise a RuntimeException will be thrown out.

If this operation returns successfully, the cancel request message is sent, and FIXSessionOrderManagerCommonListener.orderCancelRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered. See FIXSessionOrderManagerSettings.alwaysSendCancelRequest() for more details about how a cancel message can be sent by order manager.

Before the message is sent, additional Visual Lambda modules and FIXSessionOrderManagerBuySideListener.orderCancelRequestSending(FIXOrder, FIXMessage) event handlers will be called. Application can hook up those handlers to provide further modification to the message (add/delete/modify the fields). Application can also use the handlers to provide further validation for the message. If the message failed the validation, a FIXOrderManagerCancelRejectException will be thrown out and the message will not be sent.

Parameters:
cancelRequest - an "Order Cancel Request" FIX message created by calling createOrderCancelRequest() on the same order

addOrderReplaceRequest

public void addOrderReplaceRequest(FIXMessage replaceRequest)
Adds a pending replace order message to the current order by sending it to the counter party. Should be used by buy side only.

The input replaceRequest message must be created by calling createOrderReplaceRequest() on the same order.

This operation can only be performed on a buy side order and the system must be running in a normal production mode. Otherwise a RuntimeException will be thrown out.

If this operation returns successfully, the replace request message is sent, and FIXSessionOrderManagerCommonListener.orderReplaceRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered. See FIXSessionOrderManagerSettings.alwaysSendReplaceRequest() for more details about how a replace message can be sent by order manager.

Before the message is sent, additional Visual Lambda modules and FIXSessionOrderManagerBuySideListener.orderReplaceRequestSending(FIXOrder, FIXMessage) event handlers will be called. Application can hook up those handlers to provide further modification to the message (add/delete/modify the fields). Application can also use the handlers to provide further validation for the message. If the message failed the validation, a FIXOrderManagerCancelRejectException will be thrown out and the message will not be sent.

Parameters:
replaceRequest - an "Order Replace Request" FIX message created by calling createOrderReplaceRequest() on the same order

addOrderStatusRequest

public void addOrderStatusRequest(FIXMessage statusReqMessage)
Adds a status request message to the current order by sending it to the counter party. Should be used by buy side only.

The input statusReqMessage message must be created by calling createOrderStatusRequest(FIXMessageComponent, String) on the same order.

This operation can only be performed on a buy side order and the system must be running in a normal production mode. Otherwise a RuntimeException will be thrown out.

If this operation returns successfully, the cancel request message is sent, and FIXSessionOrderManagerCommonListener.orderStatusRequestAdded(FIXOrder, FIXMessage, FIXEngineMessageHandlerStatus) event is triggered. See FIXSessionOrderManagerSettings.alwaysSendStatusRequest() for more details about how a status request message can be sent by order manager.

Parameters:
statusReqMessage - an "Order Status Request" FIX message created by calling createOrderStatusRequest(FIXMessageComponent, String) on the same order.

getMessage

public FIXMessage getMessage(int index)
Description copied from class: FIXOrder
Gets the FIXMessage related to this order by specified index.

Specified by:
getMessage in class FIXOrder
Parameters:
index - the index
Returns:
the message
See Also:
FIXOrder.getMessageCount()

getMessageCount

public int getMessageCount()
Description copied from class: FIXOrder
Gets the number of messages related to the current order.

Specified by:
getMessageCount in class FIXOrder
Returns:
the message count
See Also:
FIXOrder.getMessage(int)

getPendingRequestsCount

public int getPendingRequestsCount()
Description copied from class: FIXOrder
Gets count of pending request FIX messages.

Specified by:
getPendingRequestsCount in class FIXOrder
Returns:
the pending requests count
See Also:
FIXOrder.getPendingRequestMessage(int)

getPendingRequestMessage

public FIXMessage getPendingRequestMessage(int pendingIndex)
Description copied from class: FIXOrder
Gets the pending request FIX message by index.

GetPendingRequestMessage does not acquire FIXOrderManager.syncRoot lock.

If the pending order is a cross order cancel or cross order replace request, the return message may contain more one side of the cross order. To get the exact side related to the current order, use getPendingRequest(int).

Specified by:
getPendingRequestMessage in class FIXOrder
Parameters:
pendingIndex - the index
Returns:
an instance of FIXMessage representing the pending request
See Also:
FIXOrder.getPendingRequestsCount()

getPendingRequest

public FIXMessageComponent getPendingRequest(int pendingIndex)
Gets a block of fields representing the information about the pending request at the index specified.

The returned value is an instance of FIXMessage (same as getPendingRequestMessage(int)) unless the pending is a cross cancel or a cross replace order, in which case the return value will be an instance of FIXMessageRepeatingInstance representing the single side of the cross order.

Parameters:
pendingIndex - the pending index
Returns:
the pending request message component

createOrderCancelReject

public FIXMessage createOrderCancelReject(FIXMessageComponent pendingRequest,
                                          char newOrdStatus,
                                          int cxlRejReason,
                                          String text)
Creates an "Order Cancel Reject" FIX message. Should be used by sell side only.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderCancelReject() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderCancelReject() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderCancelReject() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderCancelRejectFromMessage() and TagCopyMapCrossOrderCancelRejectFromCrossSide if the FIXOrderType is CrossPopulated.

The tag copy maps defined in FIXSessionOrderManagerSettings are managed by QWFIX Enterprise Manager. They are used internally to create order handling related FIX messages, for example, copying fields such as Symbol from order message to execution messages.

Users should use GUI tool to modify these maps. Application developers should never touch these maps.

Parameters:
pendingRequest - the pending Cancel or Cancel/Replace request
newOrdStatus - the new OrdStatus of the order. See "Remarks" for more details
cxlRejReason - the CxlRejReason field in CancelReject FIX message as defined in FIX specification
text - Text field in CancelReject FIX message. This value will be ignored if it's null ot empty
Returns:
an "Order Cancel Reject" FIX message

addExecution

public void addExecution(FIXMessage execMessage)
Adds an execution report message to order. Used by sell side only. FIXSessionOrderManagerCommonListener.ExecXXXAdded, FIXSessionOrderManagerSimplifiedListener.executionAdded(FIXRegularOrder, FIXMessage, int, FIXEngineMessageHandlerStatus) and FIXSessionOrderManagerSimplifiedListener.orderUpdated(FIXOrder, int, FIXEngineMessageHandlerStatus) events will be triggered.

Parameters:
execMessage - the execution message

addCancelReject

public void addCancelReject(FIXMessage cxlRejMessage)
Adds a "Cancel Reject" message to the current order by sending it to the counter party. Should be used by sell side only.

The input cxlRejMessage message must be created by calling createOrderCancelReject(FIXMessageComponent, char, int, String) on the same order.

This operation can only be performed on a sell side order and the system must be running in a normal production mode. Otherwise a RuntimeException will be thrown out.

If this operation returns successfully, the cancel request message is sent, and FIXSessionOrderManagerCommonListener.orderCancelRejectAdded(FIXRegularOrder, FIXMessage, FIXMessageComponent, FIXEngineMessageHandlerStatus) event is triggered.

Parameters:
cxlRejMessage - the "Cancel Reject" message

getLastExecution

public FIXMessageComponent getLastExecution()
Gets the message component representing the last execution of the current order.

Last execution message component contains the information of the latest progress of the order such as CumQty, AvgPx and OrdStatus.

It may not be an instance of FIXMessage. It may be a repeating instance inside ListStatus message.

Returns:
the last execution message or repeating instance (list order only, as ListStatusGrp) ; or null if there's no execution yet

getLastExecutionMessage

public FIXMessage getLastExecutionMessage()
Gets the FIX message representing the last execution of the current order.

Last execution message component contains the information of the latest progress of the order such as CumQty, AvgPx and OrdStatus.

The message may be a ListStatus message.

Returns:
the last execution message; or null if no execution is received

getOrdStatus

public char getOrdStatus()
Gets the OrdStatus of the current order.

The return will never be PendingCancel or PendingReplace or Replaced, even if the current order is in pending state. It always returns the "real" underlying OrdStatus such as PartiallyFilled or New etc.

If LastExecution is null, this property returns AcceptedForBidding. Please always check getLastExecution() to make sure this value makes sense.

Returns:
the order status

getOrder

public FIXMessageComponent getOrder(String clOrdID)
Gets an order by specified ClOrdID from current order.

The returned instance may be an instance of FIXMessage representing a single order or cancel or replace of a single order; an order repeating instance in list order; a side repeating instance from cross order or cross cancel or cross replace; or a multileg order or replace of multileg order; or a restated execution report; or null.

Parameters:
clOrdID - the ClOrdID
Returns:
the FIXMessage or FIXMessageRepeatingInstance representing the order; or null if not found
See Also:
getExecution(String)

getExecution

public FIXMessage getExecution(String execID)
Gets an "Execution Report" message by specified ExecID.

Parameters:
execID - the ExecID
Returns:
an instance of FIXMessage representing the execution report; or null if no execution matched in current order
See Also:
getOrder(String)

createNewExecutionNew

public FIXMessage createNewExecutionNew()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=New.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionPendingNew

public FIXMessage createNewExecutionPendingNew()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=PengingNew.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionPartiallyFilled

public FIXMessage createNewExecutionPartiallyFilled()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=PartiallyFilled.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionFilled

public FIXMessage createNewExecutionFilled()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Filled.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionCanceled

public FIXMessage createNewExecutionCanceled(FIXMessageComponent pendingOrder)
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Canceled.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

FIX 4.3+ has slightly different logic in OrigClOrdID handling. In FIX 4.2 and 4.1, the OrigClOrdID in "ExecutionReport" always matches the value in the original "Cancel Request" or "Replace Request" message. However, in FIX 4.3+, the OrigClOrdID will always be the ClOrdID of "getCurrentOrder()". QWFIX implements the exact behavior that matches the specifications.

Parameters:
pendingOrder - the pending cancel request order; or null for unsolicited cancel
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionReplaced

public FIXMessage createNewExecutionReplaced(FIXMessageComponent pendingOrder,
                                             boolean filled)
Create an "Execution Report" FIX message with ExecType=Replace.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

The filled parameter can only be used with replace quest with a different quantity. If the requested OrderQty is below CumQty, the replace order should be equivalent to a cancel request, then filled parameter should be true (because "Filled" order status has precedence over "Canceled", the order status in execution message should be "Filled"). If the requested OrderQty is above CumQty, the filled should be false, even if the order is already been filled. That will allow replacing an already filled order with increase quantity (order status will turn back from Filled to Partially Filled).

FIX 4.3+ has slightly different logic in OrigClOrdID handling. In FIX 4.2 and 4.1, the OrigClOrdID in "ExecutionReport" always matches the value in the original "Cancel Request" or "Replace Request" message. However, in FIX 4.3+, the OrigClOrdID will always be the ClOrdID of "getCurrentOrder()". QWFIX implements the exact behavior that matches the specifications.

Parameters:
pendingOrder - the pending replace request order; or null for unsolicited cancel
filled - true if the requested OrderQty is below CumQty (D12 of "Appendix D" in FIX 4.2 specification). See "Remarks" for more details
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionPendingCancel

public FIXMessage createNewExecutionPendingCancel(FIXMessageComponent pendingOrder)
Create an "Execution Report" FIX message with ExecType=PendingCancel and OrdStatus=PendingCancel.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

FIX 4.3+ has slightly different logic in OrigClOrdID handling. In FIX 4.2 and 4.1, the OrigClOrdID in "ExecutionReport" always matches the value in the original "Cancel Request" or "Replace Request" message. However, in FIX 4.3+, the OrigClOrdID will always be the ClOrdID of "getCurrentOrder()". QWFIX implements the exact behavior that matches the specifications.

Parameters:
pendingOrder - the pending cancel request order; or null for unsolicited cancel
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionPendingReplace

public FIXMessage createNewExecutionPendingReplace(FIXMessageComponent pendingOrder)
Create an "Execution Report" FIX message with ExecType=PendingReplace and OrdStatus=PendingReplace.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

FIX 4.3+ has slightly different logic in OrigClOrdID handling. In FIX 4.2 and 4.1, the OrigClOrdID in "ExecutionReport" always matches the value in the original "Cancel Request" or "Replace Request" message. However, in FIX 4.3+, the OrigClOrdID will always be the ClOrdID of "getCurrentOrder()". QWFIX implements the exact behavior that matches the specifications.

Parameters:
pendingOrder - the pending replace request order; or null for unsolicited cancel
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionDoneForDay

public FIXMessage createNewExecutionDoneForDay()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=DoneForDay.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionStoppedNotification

public FIXMessage createNewExecutionStoppedNotification()
Create an "Execution Report" FIX message with ExecType=Stopped and OrdStatus=Stopped.

Stopped trade can be used for some kind of guaranteed execution. Application first send a "notification" to notify the guaranteed price and quantity. The notification can be created by calling this method. Application should send the actual trade later on, possibly with improved price. The actual trade can be created by calling createNewExecutionStoppedTrade().

In FIX 4.1 and 4.2, the "notification" and the actual "trade" message have the same ExecType and OrdStatus. In FIX 4.3+, the "notification" has ExecType = "Stopped" while "trade" message has ExecType = "Trade".

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionStoppedTrade

public FIXMessage createNewExecutionStoppedTrade()
Create an "Execution Report" FIX message with ExecType=Trade and OrdStatus=Stopped.

Stopped trade can be used for some kind of guaranteed execution. Application first send a "notification" to notify the guaranteed price and quantity. The notification can be created by calling createNewExecutionStoppedNotification(). Application should send the actual trade later on, possibly with improved price. The actual trade can be created by calling this method.

In FIX 4.1 and 4.2, the "notification" and the actual "trade" message have the same ExecType and OrdStatus. In FIX 4.3+, the "notification" has ExecType = "Stopped" while "trade" message has ExecType = "Trade".

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the fIX message

createNewExecutionRejected

public FIXMessage createNewExecutionRejected(int ordRejReason)
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Rejected.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Parameters:
ordRejReason - the reason code
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionSuspended

public FIXMessage createNewExecutionSuspended()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Suspended.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionCalculated

public FIXMessage createNewExecutionCalculated()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Calculated.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionExpired

public FIXMessage createNewExecutionExpired()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=Expired.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionAcceptedForBidding

public FIXMessage createNewExecutionAcceptedForBidding()
Create an "Execution Report" FIX message with ExecType=New and OrdStatus=AcceptedForBidding.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createNewExecutionRestated

public FIXMessage createNewExecutionRestated()
Create an "Execution Report" FIX message with ExecType=Restated

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createStatusExecution

public FIXMessage createStatusExecution(FIXMessage statusReqMessage)
Create an "Execution Report" FIX message with ExecType=Status.

If the method returns null, no execution report message should be sent for the status change for the version of FIX protocol associated with this order.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

NewExecutionNonTradeCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Parameters:
statusReqMessage - The "Order Status Request" message.
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

CreateCancelExecution

public FIXMessage CreateCancelExecution(FIXMessage refExecution,
                                        char newExecType,
                                        char newOrdStatus)
Create an "Execution Report" FIX message that busts a previous execution.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

ExecutionCancelCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Parameters:
refExecution - the reference execution message to be busted
newExecType - the new ExecType
newOrdStatus - the new OrdStatus
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

createCorrectExecution

public FIXMessage createCorrectExecution(FIXMessage refExecution,
                                         char newExecType,
                                         char newOrdStatus)
Create an "Execution Report" FIX message that busts a previous execution.

Depending on the type of the current order, one of the following FIXTagCollection will be used to copy tags: FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromActiveOrder() if the FIXOrderType is Single; FIXSessionOrderManagerSchemaSettings.getTagCopyMapListOrderExecutionFromActiveOrder() if the FIXOrderType is ListPopulated; FIXSessionOrderManagerSchemaSettings.getTagCopyMapMultilegOrderExecutionFromActiveOrder() if the FIXOrderType is Multileg. FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveOrderMessage() and FIXSessionOrderManagerSchemaSettings.getTagCopyMapCrossOrderExecutionFromActiveCrossSide() if the FIXOrderType is CrossPopulated.

ClOrdID will be copied from the getCurrentOrder(). If FIXOrderType is CrossPopulated, CrossID will be copied from getCurrentOrderMessage(). If FIXOrderType is ListPopulated, ListID will be copied from getCurrentOrderMessage().

ExecutionCorrectCreating Visual Lambda modules will be triggered before the method returns. It gives the application the flexibility to further manipulate the message.

ExecID and OrderID are not automatically generated. Application is required to add those tag values before sending the order.

Execution price and quantity information are not generated either (e.g. ExecID, OrderID, CumQty, DayCumQty, LeavesQty, AvgPx etc). For status or normal "non-trade" execution messages, it is recommended that applications use the tag maps such as FIXSessionOrderManagerSchemaSettings.getTagCopyMapSingleOrderExecutionFromLastExecution() to copy those fields from the last execution message, if the last execution exists. Nevertheless applications can always have their own implementation.

Parameters:
refExecution - the reference execution message to be busted
newExecType - the new ExecType
newOrdStatus - the new OrdStatus
Returns:
the "Execution Report" FIX message; or null if the execution type is not supported in current version of FIX protocol

getMessageSubIndex

public int getMessageSubIndex(int index)
Gets the "sub index" of the message at specified index.

When using getMessage(int) to get the message of the current order at the specified index, the returned message might be a "New Order List", "New Order Cross", "Cross Order Cancel Request" or "Cross Order Replace Request" message. Those types of messages may have more one repeating instances ("list orders" or "cross side"). Only one instance is related to the current order. getMessageSubIndex will get the sub index of the instance, if the instance exists.

Parameters:
index - the index
Returns:
the "sub index" of the message at specified index; or -1