FIXListOrder - Portfolio/Basket/Programming Trading

QWFIX Order Management fully supports the "List" order used in portfolio/basket/programming trading business.

FIX message types related to list order are "NewOrderList", "ListStatusRequest", "ListStatus", "ListCancelRequest" and "ListExecute".

In QWFIX, list order is represetned by an instance of FIXListOrder.

 

Creating and Sending a New List Order

A list order may be represented by more than one "NewOrderList" messages. It may be result of "fragmentation" defined in FIX protocol specification to limit the size of every individual FIX messages.

Calling FIXSessionOrderManager.AddNewListOrder on a buy side session will create and send the list order to the counter party. If any of the order message is invalid (for example, missing required tag), the method will throw out an exception before sending out any message. So if any exception is thrown out, it's safe to assume that the counter party receives nothing (no "partial" list order will be sent).

Once the list order is successfully sent or received, OrderAdded event will be triggered on the session order manager. Note, before of the possible order message fragmentation, a list order will be composed of more than one "New Order List" messages. The sell side session is smart enough that it only fires OrderAdded event once when the last message of the fragment is received.

 

Cancel or Execute the List Order

Buy side application can further instruct the sell side to cancel or execute the list order once the list is sent. QWFIX provides API to create and send "List Cancel Request" or "List Execute" to sell side. Events notifications of those messages are also defined in FIXSessionOrderManager.

 

List Status

Sell side application can send "List Status" by calling FIXListOrder.AddListStatus. Note the list status may also be fragmented. The buy side will fire ListStatusAdded event upon reception of the last "List Status" of the fragment.

 

Populating List Orders

A list order may contain a group of single orders. Each of them has a "ClOrdID". The single orders are represented as a group of FIXRegularOrder. Each FIXRegularOrder has FIXOrderType of "ListPopulated". The collection can be accessed from FIXListOrder.Orders property.

QWFIX automatically "populate" the orders contained in a list order so that each of them can be searched by ClOrdID in FIXSessionOrderList (see "Order List").

Note: the list order is only populated when a "List Execute" message is issued. If the list is canceled without "List Execute", no order will be populated. See FIXListOrder.AddListExecute for more information.

After "List Status" is issued, the LastExecution of each single order gets automatically updated. However, only ListStatusAdded event will be fired. The execution related events of each FIXRegularOrder will not be fired.