internal AccountValue(ResponseComposer c) { c.RequireVersion(2); Key = c.ReadString(); Value = c.ReadString(); Currency = c.ReadString(); Account = c.ReadString(); }
internal HistoricalNews(ResponseComposer c) { RequestId = c.ReadInt(); Time = c.ReadString(); ProviderCode = c.ReadString(); ArticleId = c.ReadString(); Headline = c.ReadString(); }
internal NewsBulletin(ResponseComposer c) { c.IgnoreVersion(); MessageId = c.ReadInt(); Type = c.ReadEnum <NewsBulletinType>(); Message = c.ReadString(); Origin = c.ReadString(); }
internal override void Deserialize(ResponseComposer c) { base.Deserialize(c); SecType = c.ReadString(); Exchange = c.ReadString(); Symbol = c.ReadString(); }
internal override void Deserialize(ResponseComposer reader) { base.Deserialize(reader); SecType = reader.ReadString(); Exchange = reader.ReadString(); Symbol = reader.ReadString(); }
internal AccountSummary(ResponseComposer c) { c.IgnoreVersion(); RequestId = c.ReadInt(); Account = c.ReadString(); Tag = c.ReadString(); Value = c.ReadString(); Currency = c.ReadString(); }
internal ScannerDataItem(ResponseComposer c) { Rank = c.ReadInt(); ContractData = new ContractData(c, ContractDataType.ScannerContractData); Distance = c.ReadString(); Benchmark = c.ReadString(); Projection = c.ReadString(); ComboLegs = c.ReadString(); }
internal HistoricalLastTick(ResponseComposer c) { Time = c.ReadLong(); TickAttribLast = new TickAttribLast(c.ReadInt()); Price = c.ReadDouble(); Size = c.ReadLong(); Exchange = c.ReadString(); SpecialConditions = c.ReadString(); }
internal TickNews(ResponseComposer c) { RequestId = c.ReadInt(); TimeStamp = c.ReadLong(); ProviderCode = c.ReadString(); ArticleId = c.ReadString(); Headline = c.ReadString(); ExtraData = c.ReadString(); }
internal AccountUpdateMulti(ResponseComposer c) { c.IgnoreVersion(); RequestId = c.ReadInt(); Account = c.ReadString(); ModelCode = c.ReadString(); Key = c.ReadString(); Value = c.ReadString(); Currency = c.ReadString(); }
internal SecurityDefinitionOptionParameter(ResponseComposer c) { RequestId = c.ReadInt(); Exchange = c.ReadString(); UnderlyingContractId = c.ReadInt(); TradingClass = c.ReadString(); Multiplier = c.ReadString(); c.AddStringsToList(Expirations); c.AddStringsToList(Strikes); }
internal ContractComboLeg(ResponseComposer c) { ContractId = c.ReadInt(); Ratio = c.ReadInt(); TradeAction = c.ReadStringEnum <TradeAction>(); Exchange = c.ReadString(); OpenClose = c.ReadEnum <ComboOpenClose>(); ComboShortSaleSlot = c.ReadEnum <ComboShortSaleSlot>(); DesignatedLocation = c.ReadString(); ExemptCode = c.ReadInt(); }
internal ContractDescription(ResponseComposer c) { Contract = new Contract { ContractId = c.ReadInt(), Symbol = c.ReadString(), SecurityType = c.ReadStringEnum <SecurityType>(), PrimaryExchange = c.ReadString(), Currency = c.ReadString() }; c.AddStringsToList(DerivativeSecTypes); }
internal TickExchangeForPhysical(ResponseComposer c) { c.IgnoreVersion(); RequestId = c.ReadInt(); TickType = c.ReadEnum <TickType>(); BasisPoints = c.ReadDouble(); FormattedBasisPoints = c.ReadString(); ImpliedFuturesPrice = c.ReadDouble(); HoldDays = c.ReadInt(); FutureExpiry = c.ReadString(); DividendImpact = c.ReadDouble(); DividendsToLastTradeDate = c.ReadDouble(); }
internal PortfolioValue(ResponseComposer c) { c.RequireVersion(8); Contract = new Contract { ContractId = c.ReadInt(), Symbol = c.ReadString(), SecurityType = c.ReadStringEnum <SecurityType>(), LastTradeDateOrContractMonth = c.ReadString(), Strike = c.ReadDouble(), Right = c.ReadStringEnum <RightType>(), Multiplier = c.ReadString(), PrimaryExchange = c.ReadString(), Currency = c.ReadString(), LocalSymbol = c.ReadString(), TradingClass = c.ReadString() }; Position = c.ReadDouble(); MarketPrice = c.ReadDouble(); MarketValue = c.ReadDouble(); AverageCost = c.ReadDouble(); UnrealizedPnl = c.ReadDouble(); RealizedPnl = c.ReadDouble(); Account = c.ReadString(); }
internal TickReqParams(ResponseComposer c) { RequestId = c.ReadInt(); MinTick = c.ReadDouble(); BboExchange = c.ReadString(); SnapshotPermissions = c.ReadInt(); }
internal override void Deserialize(ResponseComposer c) { base.Deserialize(c); ConId = c.ReadInt(); Exchange = c.ReadString(); }
internal override void Deserialize(ResponseComposer reader) { base.Deserialize(reader); ConId = reader.Read <int>(); Exchange = reader.ReadString(); }
} // The aggregated group internal MktDepthExchange(ResponseComposer c) { Exchange = c.ReadString(); SecType = c.ReadString(); if (c.Config.SupportsServerVersion(ServerVersion.ServiceDataType)) { ListingExch = c.ReadString(); ServiceDataTyp = c.ReadString(); AggGroup = c.ReadIntNullable(); } else { ListingExch = ""; ServiceDataTyp = c.ReadBool() ? "Deep2" : "Deep"; } }
internal OrderStatusReport(ResponseComposer c) { var serverVersion = c.Config.ServerVersionCurrent; var version = serverVersion >= ServerVersion.MarketCapPrice ? int.MaxValue : c.ReadInt(); OrderId = c.ReadInt(); Status = c.ReadStringEnum <OrderStatus>(); Filled = c.ReadDouble(); Remaining = c.ReadDouble(); AverageFillPrice = c.ReadDouble(); if (version >= 2) { PermanentId = c.ReadInt(); } if (version >= 3) { ParentId = c.ReadInt(); } if (version >= 4) { LastFillPrice = c.ReadDouble(); } if (version >= 5) { ClientId = c.ReadInt(); } if (version >= 6) { WhyHeld = c.ReadString(); } if (serverVersion >= ServerVersion.MarketCapPrice) { MktCapPrice = c.ReadDouble(); } }
internal CommissionReport(ResponseComposer c) { c.IgnoreVersion(); ExecutionId = c.ReadString(); Commission = c.ReadDouble(); Currency = c.ReadString(); RealizedPnl = c.ReadDouble(); Yield = c.ReadDouble(); YieldRedemptionDate = c.ReadInt(); if (Execution.Executions.TryGetValue(ExecutionId, out Execution execution)) { Execution = execution; OrderId = execution.OrderId; RequestId = execution.RequestId; } }
internal HistoricalData(ResponseComposer c) { RequestId = c.ReadInt(); BarCount = c.ReadInt(); Date = c.ReadString(); Open = c.ReadDouble(); Close = c.ReadDouble(); High = c.ReadDouble(); Low = c.ReadDouble(); WAP = c.ReadDouble(); Volume = c.ReadLong(); }
internal RealtimeBar(ResponseComposer c) { c.IgnoreVersion(); RequestId = c.ReadInt(); Time = Instant.FromUnixTimeSeconds(long.Parse(c.ReadString(), NumberFormatInfo.InvariantInfo)); Open = c.ReadDouble(); High = c.ReadDouble(); Low = c.ReadDouble(); Close = c.ReadDouble(); Volume = c.ReadLong(); Wap = c.ReadDouble(); Count = c.ReadInt(); }
internal SmartComponents(ResponseComposer c) { RequestId = c.ReadInt(); var n = c.ReadInt(); for (var i = 0; i < n; i++) { var bitNumber = c.ReadInt(); var exchange = c.ReadString(); var exchangeLetter = c.ReadChar(); Map.Add(bitNumber, new KeyValuePair <string, char>(exchange, exchangeLetter)); } }
internal HistoricalBar(ResponseComposer c) { Date = c.ReadLocalDateTime(HistoricalBars.DateTimePattern); Open = c.ReadDouble(); High = c.ReadDouble(); Low = c.ReadDouble(); Close = c.ReadDouble(); Volume = c.Config.ServerVersionCurrent < ServerVersion.SyntRealtimeBats ? c.ReadInt() : c.ReadLong(); WeightedAveragePrice = c.ReadDouble(); if (!c.Config.SupportsServerVersion(ServerVersion.SyntRealtimeBats)) { c.ReadString(); /*string hasGaps = */ } Count = c.ReadInt(); }
internal MarketDepth(ResponseComposer c, bool isLevel2) { c.IgnoreVersion(); RequestId = c.ReadInt(); Position = c.ReadInt(); MarketMaker = isLevel2 ? c.ReadString() : string.Empty; Operation = c.ReadEnum <MarketDepthOperation>(); Side = c.ReadEnum <MarketDepthSide>(); Price = c.ReadDouble(); Size = c.ReadInt(); if (isLevel2 && c.Config.SupportsServerVersion(ServerVersion.SmartDepth)) { IsSmartDepth = c.ReadBool(); } }
internal static Tick Create(ResponseComposer c) { c.IgnoreVersion(); var requestId = c.ReadInt(); var tickType = c.ReadEnum <TickType>(); var str = c.ReadString(); if (tickType == TickType.RealtimeVolume) { return(new TickRealtimeVolume(requestId, str, c.Parser)); } if (tickType == TickType.LastTimeStamp) { return(new TickTime(requestId, str)); } return(new TickString(requestId, tickType, str)); }
internal AccountPositionMulti(ResponseComposer c) { c.IgnoreVersion(); RequestId = c.ReadInt(); Account = c.ReadString(); Contract = new Contract { ContractId = c.ReadInt(), Symbol = c.ReadString(), SecurityType = c.ReadStringEnum <SecurityType>(), LastTradeDateOrContractMonth = c.ReadString(), Strike = c.ReadDouble(), Right = c.ReadStringEnum <RightType>(), Multiplier = c.ReadString(), Exchange = c.ReadString(), Currency = c.ReadString(), LocalSymbol = c.ReadString(), TradingClass = c.ReadString() }; Pos = c.ReadDouble(); AvgCost = c.ReadDouble(); ModelCode = c.ReadString(); }
internal AccountPosition(ResponseComposer c) { c.RequireVersion(3); Account = c.ReadString(); Contract = new Contract { ContractId = c.ReadInt(), Symbol = c.ReadString(), SecurityType = c.ReadStringEnum <SecurityType>(), LastTradeDateOrContractMonth = c.ReadString(), Strike = c.ReadDouble(), Right = c.ReadStringEnum <RightType>(), Multiplier = c.ReadString(), Exchange = c.ReadString(), Currency = c.ReadString(), LocalSymbol = c.ReadString(), TradingClass = c.ReadString() }; Position = c.ReadDouble(); // may be an int AverageCost = c.ReadDouble(); }
internal ScannerParameters(ResponseComposer c) { c.IgnoreVersion(); Parameters = c.ReadString(); }