All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.marketcetera.trade.RootOrderIdFactory Maven / Gradle / Ivy

The newest version!
package org.marketcetera.trade;

import org.marketcetera.trade.OrderID;
import org.marketcetera.trade.TradeMessage;

import quickfix.Message;

/* $License$ */

/**
 * Constructs root order id values.
 * 
 * 

The root order ID is a Marketcetera para-FIX artifact that uniquely identifies an order chain. * An order chain can be loosely defined as all the FIX messages whose execution reports share the same broker OrderID (37) value. * When persisting messages, Marketcetera identifies the root order ID for an order chain and uses that to link messages together. * This is particularly useful when calculating positions to make sure that partial fills aren't counted twice. * * @author Colin DuPlantis * @version $Id$ * @since 2.5.0 */ public interface RootOrderIdFactory { /** * Gets the root order id associated with the given report. * * @param inReport a TradeMessage value * @return an OrderID value or null if no root order id exists */ OrderID getRootOrderId(TradeMessage inReport); /** * Gets the root order id associated with the given message. * * @param inMessage a Message value * @return an OrderID value or null if no root order id exists */ OrderID getRootOrderId(Message inMessage); /** * Records outgoing messages, if necessary. * * @param inMessage a Message value */ void receiveOutgoingMessage(Message inMessage); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy