using System;
namespace Krs.Ats.IBNet
{
///
/// Argument passed to interactive brokers when requesting execution history.
///
[Serializable()]
public class ExecutionFilter
{
#region Private Variables
private String acctCode;
private int clientId;
private String exchange;
private SecurityType securityType;
private ActionSide side;
private String symbol;
private DateTime time;
#endregion
#region Constructors
///
/// Default Constructor
///
public ExecutionFilter()
{
securityType = SecurityType.Undefined;
side = ActionSide.Undefined;
}
///
/// Full Constructor
///
/// Filter the results of the ReqExecutions() method based on the clientId.
/// Filter the results of the ReqExecutions() method based on an account code.
/// Filter the results of the ReqExecutions() method based on execution reports received after the specified time.
/// Filter the results of the ReqExecutions() method based on the order symbol.
/// Refer to the Contract struct for the list of valid security types.
/// Filter the results of the ReqExecutions() method based on the order exchange.
/// Filter the results of the ReqExecutions() method based on the order action.
public ExecutionFilter(int clientId, String acctCode, DateTime time, String symbol, SecurityType securityType,
String exchange, ActionSide side)
{
this.clientId = clientId;
this.acctCode = acctCode;
this.time = time;
this.symbol = symbol;
this.securityType = securityType;
this.exchange = exchange;
this.side = side;
}
#endregion
#region Properties
///
/// Filter the results of the ReqExecutions() method based on the clientId.
///
public int ClientId
{
get { return clientId; }
set { clientId = value; }
}
///
/// Filter the results of the ReqExecutions() method based on an account code.
///
/// This is only relevant for Financial Advisor (FA) accounts.
public string AcctCode
{
get { return acctCode; }
set { acctCode = value; }
}
///
/// Filter the results of the ReqExecutions() method based on execution reports received after the specified time.
///
/// The format for timeFilter is "yyyymmdd-hh:mm:ss"
public DateTime Time
{
get { return time; }
set { time = value; }
}
///
/// Filter the results of the ReqExecutions() method based on the order symbol.
///
public string Symbol
{
get { return symbol; }
set { symbol = value; }
}
///
/// Filter the results of the ReqExecutions() method based on the order security type.
///
/// Refer to the Contract struct for the list of valid security types.
public SecurityType SecurityType
{
get { return securityType; }
set { securityType = value; }
}
///
/// Filter the results of the ReqExecutions() method based on the order exchange.
///
public string Exchange
{
get { return exchange; }
set { exchange = value; }
}
///
/// Filter the results of the ReqExecutions() method based on the order action.
///
/// Refer to the Order struct for the list of valid order actions.
public ActionSide Side
{
get { return side; }
set { side = value; }
}
#endregion
}
}