public void HandleNewUnderlyierEvent(NewUnderlyierEventPayload eventPayLoad) { if (log.IsDebugEnabled) { log.Debug("Received new underlyier event from UnderlyingManager: " + eventPayLoad); } Underlyings.Add(eventPayLoad.NewUnderlying); }
public SecurityDefinition(Security security) : base(MessageType.SecurityDefinition) { MatchEventIndicator = MatchEventIndicator.LastMessage; TotNumReports = 1; SecurityUpdateAction = SecurityUpdateAction.Add; LastUpdateTime = DateTime.UtcNow; //ChannelId = security.ChannelId; MarketSegmentId = security.MarketSegmentId; Contract = security.Contract; Id = security.Id; IdSource = security.IdSource; MaturityMonth = security.MaturityMonth; Product = security.Product; Group = security.Group; //SecurityType = security.Type; //SecuritySubType = security.StrategyType; CfiCode = security.CfiCode; PutOrCall = security.PutOrCall; UnderlyingAssetClass = security.AssetClass; Exchange = security.Exchange; MDSecurityTradingStatus = security.TradingStatus; StrikePrice = security.StrikePrice; //StrikeCurrency = security.StrikeCurrency; //Currency = security.Currency; //SettlementCurrency = security.SettlementCurrency; MinCabPrice = security.MinCabPrice; UserDefinedInstrument = security.UserDefinedInstrument; foreach (var u in security.Underlyings) { Underlyings.Add(new SecurityDefinitionUnderlying() { Symbol = u.Symbol, SecurityId = u.Id, SecurityIdSource = u.IdSource, }); } foreach (var l in security.Legs) { Legs.Add(new SecurityDefinitionLeg() { LegSecurityID = l.Security.Id, LegSide = l.Side, LegRatioQty = l.Quantity, LegPrice = l.Price, //LegOptionDelta = l.OptionDelta, }); } foreach (var f in security.FeedTypes) { MdFeedTypes.Add(new SecurityDefinitionFeedTypes() { MDFeedType = f.IncludesImplieds ? "GBX" : "GBI", MarketDepth = f.Depth, }); } if (security.ActivationTime.HasValue) { Events.Add(new SecurityDefinitionEvent() { EventType = EventType.Activation, EventTime = security.ActivationTime.Value, }); } if (security.ExpiryTime.HasValue) { Events.Add(new SecurityDefinitionEvent() { EventType = EventType.LastEligibleTradeDate, EventTime = security.ExpiryTime.Value, }); } MatchAlgorithm = security.MatchAlgorithm; foreach (var ltr in security.LotTypeRules) { LotTypeRules.Add(new SecurityDefinitionLotTypeRule() { LotType = ltr.LotType, MinLotSize = ltr.MinLotSize, }); } MinTradeVol = security.MinOrderQuantity; MaxTradeVol = security.MaxOrderQuantity; MinPriceIncrement = security.TickSize; MinPriceIncrementAmount = security.TickValue; DisplayFactor = security.DisplayFactor; PriceRatio = security.PriceRatio; TickRule = security.TickRule; MainFraction = security.MainFraction; SubFraction = security.SubFraction; PriceDisplayFormat = security.PriceDisplayFormat; foreach (var ia in security.InstrumentAttributes) { InstAttribs.Add(new SecurityDefinitionInstrumentAttribute() { InstAttribType = ia.Type, InstAttribValue = ia.Value, }); } ContractMultiplierUnit = security.ContractMultiplierUnit; FlowScheduleType = security.FlowScheduleType; //ContractMultiplier = security.ContractMultiplier; //UnitOfMeasure = security.UnitOfMeasure; UnitOfMeasureQty = security.UnitOfMeasureQuantity; DecayQty = security.DecayQty; DecayStartDate = security.DecayStartDate; OriginalContractSize = security.OriginalContractSize; TradingReferencePrice = security.TradingReferencePrice; SettlementPriceType = security.SettlementPriceType; TradingReferenceDate = security.TradingReferenceDate; OpenInterest = security.OpenInterest; ClearedVolume = security.ClearedVolume; HighLimitPrice = security.HighLimitPrice; LowLimitPrice = security.LowLimitPrice; MaxPriceVariation = security.MaxPriceVariation; }