public override object GetField(Main.Common.Enums.Fields field) { MarketDataFields mdField = (MarketDataFields)field; if (mdField == MarketDataFields.Error) { return(Error); } else if (mdField == MarketDataFields.Symbol) { return(Symbol); } return(MarketDataFields.NULL); }
public override object GetField(Main.Common.Enums.Fields field) { MarketDataFields mdField = (MarketDataFields)field; if (Trade == null) { return(MarketDataFields.NULL); } if (mdField == MarketDataFields.Symbol) { return(Trade.symbol); } else if (mdField == MarketDataFields.Trade) { return(Trade.price); } else if (mdField == MarketDataFields.MDTradeSize) { return(Trade.size); } else if (mdField == MarketDataFields.Timestamp) { TimeSpan elapsed = Trade.timestamp - new DateTime(1970, 1, 1); return(Convert.ToInt64(elapsed.TotalMilliseconds)); } else if (mdField == MarketDataFields.TradeId) { return(Trade.trdMatchID); } else if (mdField == MarketDataFields.Side) { return(GetSide()); } else if (mdField == MarketDataFields.MyTrade) { return(Trade.trdMatchID != "00000000-0000-0000-0000-000000000000"); } else if (mdField == MarketDataFields.LastTrade) { return(LastTrade); } else { return(MarketDataOrderBookEntryFields.NULL); } }
public override object GetField(Main.Common.Enums.Fields field) { MarketDataFields mdField = (MarketDataFields)field; if (Security == null) { return(MarketDataFields.NULL); } if (mdField == MarketDataFields.Symbol) { return(Security.Symbol); } else if (mdField == MarketDataFields.SecurityType) { return(Security.SecType); } else if (mdField == MarketDataFields.Currency) { return(Security.Currency); } else if (mdField == MarketDataFields.MDMkt) { return(Security.Exchange); } if (Security == null || Security.MarketData == null) { return(MarketDataFields.NULL); } if (mdField == MarketDataFields.OpeningPrice) { return(Security.MarketData.OpeningPrice); } else if (mdField == MarketDataFields.ClosingPrice) { return(Security.MarketData.ClosingPrice); } else if (mdField == MarketDataFields.TradingSessionHighPrice) { return(Security.MarketData.TradingSessionHighPrice); } else if (mdField == MarketDataFields.TradingSessionLowPrice) { return(Security.MarketData.TradingSessionLowPrice); } else if (mdField == MarketDataFields.TradingSessionLowPrice) { return(Security.MarketData.TradingSessionLowPrice); } else if (mdField == MarketDataFields.TradeVolume) { return(Security.MarketData.TradeVolume); } else if (mdField == MarketDataFields.OpenInterest) { return(Security.MarketData.OpenInterest); } else if (mdField == MarketDataFields.SettlType) { return(Security.MarketData.SettlType); } else if (mdField == MarketDataFields.CompositeUnderlyingPrice) { return(Security.MarketData.CompositeUnderlyingPrice); } else if (mdField == MarketDataFields.MidPrice) { return(Security.MarketData.MidPrice); } else if (mdField == MarketDataFields.SessionHighBid) { return(Security.MarketData.SessionHighBid); } else if (mdField == MarketDataFields.SessionLowOffer) { return(Security.MarketData.SessionLowOffer); } else if (mdField == MarketDataFields.EarlyPrices) { return(Security.MarketData.EarlyPrices); } else if (mdField == MarketDataFields.Trade) { return(Security.MarketData.Trade); } else if (mdField == MarketDataFields.MDTradeSize) { return(Security.MarketData.MDTradeSize); } else if (mdField == MarketDataFields.BestBidPrice) { return(Security.MarketData.BestBidPrice); } else if (mdField == MarketDataFields.BestAskPrice) { return(Security.MarketData.BestAskPrice); } else if (mdField == MarketDataFields.BestBidSize) { return(Security.MarketData.BestBidSize); } else if (mdField == MarketDataFields.BestBidCashSize) { return(Security.MarketData.BestBidCashSize); } else if (mdField == MarketDataFields.BestAskSize) { return(Security.MarketData.BestAskSize); } else if (mdField == MarketDataFields.BestAskCashSize) { return(Security.MarketData.BestAskCashSize); } else if (mdField == MarketDataFields.BestBidExch) { return(Security.MarketData.BestBidExch); } else if (mdField == MarketDataFields.BestAskExch) { return(Security.MarketData.BestAskExch); } else if (mdField == MarketDataFields.MDEntryDate) { return(Security.MarketData.MDEntryDate); } else if (mdField == MarketDataFields.MDEntryTime) { return(Security.MarketData.MDLocalEntryDate); } else if (mdField == MarketDataFields.MDLocalEntryDate) { return(Security.MarketData.MDLocalEntryDate); } else if (mdField == MarketDataFields.ReverseMarketData) { return(Security.ReverseMarketData); } else if (mdField == MarketDataFields.LastTradeDateTime) { return(Security.MarketData.LastTradeDateTime); } else if (mdField == MarketDataFields.PercentageChange) { return(Security.MarketData.PercentageChange); } return(MarketDataFields.NULL); }