using System; namespace Krs.Ats.IBNet { /// /// Scanner Subscription details to pass to Interactive Brokers /// [Serializable()] public class ScannerSubscription { #region Private Variables private double abovePrice = Double.MaxValue; private int aboveVolume = Int32.MaxValue; private int averageOptionVolumeAbove = Int32.MaxValue; private double belowPrice = Double.MaxValue; private double couponRateAbove = Double.MaxValue; private double couponRateBelow = Double.MaxValue; private String excludeConvertible; private String instrument; private String locationCode; private double marketCapAbove = Double.MaxValue; private double marketCapBelow = Double.MaxValue; private String maturityDateAbove; private String maturityDateBelow; private String moodyRatingAbove; private String moodyRatingBelow; private int numberOfRows = -1; //No row number specified private String scanCode; private String scannerSettingPairs; private String spRatingAbove; private String spRatingBelow; private String stockTypeFilter; #endregion #region Properties /// /// Defines the number of rows of data to return for a query. /// public int NumberOfRows { get { return numberOfRows; } set { numberOfRows = value; } } /// /// Defines the instrument type for the scan. /// public string Instrument { get { return instrument; } set { instrument = value; } } /// /// The location, currently the only valid location is US stocks. /// public string LocationCode { get { return locationCode; } set { locationCode = value; } } /// /// Can be left blank. /// public string ScanCode { get { return scanCode; } set { scanCode = value; } } /// /// Filter out contracts with a price lower than this value. /// Can be left blank. /// public double AbovePrice { get { return abovePrice; } set { abovePrice = value; } } /// /// Filter out contracts with a price higher than this value. /// Can be left blank. /// public double BelowPrice { get { return belowPrice; } set { belowPrice = value; } } /// /// Filter out contracts with a volume lower than this value. /// Can be left blank. /// public int AboveVolume { get { return aboveVolume; } set { aboveVolume = value; } } /// /// Can leave empty. /// public int AverageOptionVolumeAbove { get { return averageOptionVolumeAbove; } set { averageOptionVolumeAbove = value; } } /// /// Filter out contracts with a market cap lower than this value. /// Can be left blank. /// public double MarketCapAbove { get { return marketCapAbove; } set { marketCapAbove = value; } } /// /// Filter out contracts with a market cap above this value. /// Can be left blank. /// public double MarketCapBelow { get { return marketCapBelow; } set { marketCapBelow = value; } } /// /// Filter out contracts with a Moody rating below this value. /// Can be left blank. /// public string MoodyRatingAbove { get { return moodyRatingAbove; } set { moodyRatingAbove = value; } } /// /// Filter out contracts with a Moody rating above this value. /// Can be left blank. /// public string MoodyRatingBelow { get { return moodyRatingBelow; } set { moodyRatingBelow = value; } } /// /// Filter out contracts with an SP rating below this value. /// Can be left blank. /// public string SPRatingAbove { get { return spRatingAbove; } set { spRatingAbove = value; } } /// /// Filter out contracts with an SP rating above this value. /// Can be left blank. /// public string SPRatingBelow { get { return spRatingBelow; } set { spRatingBelow = value; } } /// /// Filter out contracts with a maturity date earlier than this value. /// Can be left blank. /// public string MaturityDateAbove { get { return maturityDateAbove; } set { maturityDateAbove = value; } } /// /// Filter out contracts with a maturity date later than this value. /// Can be left blank. /// public string MaturityDateBelow { get { return maturityDateBelow; } set { maturityDateBelow = value; } } /// /// Filter out contracts with a coupon rate lower than this value. /// Can be left blank. /// public double CouponRateAbove { get { return couponRateAbove; } set { couponRateAbove = value; } } /// /// Filter out contracts with a coupon rate higher than this value. /// Can be left blank. /// public double CouponRateBelow { get { return couponRateBelow; } set { couponRateBelow = value; } } /// /// Filter out convertible bonds. /// Can be left blank. /// public string ExcludeConvertible { get { return excludeConvertible; } set { excludeConvertible = value; } } /// /// Can leave empty. For example, a pairing "Annual, true" used on the /// "top Option Implied Vol % Gainers" scan would return annualized volatilities. /// public string ScannerSettingPairs { get { return scannerSettingPairs; } set { scannerSettingPairs = value; } } /// /// ALL (excludes nothing) /// STOCK (excludes ETFs) /// ETF (includes ETFs) /// public string StockTypeFilter { get { return stockTypeFilter; } set { stockTypeFilter = value; } } #endregion } }