Both sell and buy sides need to maintain a database of all open GT orders.
Code below demonstrates how sell side synchromizes GT orders by sending the GT order to buy side in "Execution Report" messages, at the begining of the trading day.
// Prerequisits: Variable "session" of type FIXSession. // All sessions can be enumerated from FIXEngine.Sessions FIXSessionOrderManager sessionOM = FIXOrderManager.GetSessionOrderManager(session); FIXMessage restatedGTExecution = sessionOM.CreateRestatedGTOrder(ValidValues.ExecRestatementReason.GTRenew); // TODO: Set fields such as ClOrdID, OrderID, ExecID, price and quantity fields, etc ... // Send the GT order to buy side. sessionOM.AddRestatedRegularGTOrder(restatedGTExecution, FIXOrderType.Single); // Event FIXSessionOrderManager.OrderAdded will be trigered immediately after the handler returns, within the same thread context.
Event handlers also need to implemented to check GT orders during recovery process in case recovery does happen.
// Prerequisits: Variable "session" of type FIXSession. // All sessions can be enumerated from FIXEngine.Sessions FIXSessionOrderManager sessionOM = FIXOrderManager.GetSessionOrderManager(session); FIXMessage restatedGTExecution = sessionOM.CreateRestatedGTOrder(ValidValues.ExecRestatementReason.GTRenew); // TODO: Set fields such as ClOrdID, OrderID, ExecID, price and quantity fields, etc ... // Send the GT order to buy side. sessionOM.AddRestatedRegularGTOrder(restatedGTExecution, FIXOrderType.Single); // Event FIXSessionOrderManager.OrderAdded will be trigered immediately after the handler returns, within the same thread context.