internal HistoricalTick(ResponseComposer c) { Time = c.ReadLong(); c.ReadInt(); // ? Price = c.ReadDouble(); Size = c.ReadLong(); }
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 HistoricalBidAskTick(ResponseComposer c) { Time = c.ReadLong(); TickAttribBidAsk = new TickAttribBidAsk(c.ReadInt()); PriceBid = c.ReadDouble(); PriceAsk = c.ReadDouble(); SizeBid = c.ReadLong(); SizeAsk = c.ReadLong(); }
internal TickNews(ResponseComposer c) { RequestId = c.ReadInt(); TimeStamp = c.ReadLong(); ProviderCode = c.ReadString(); ArticleId = c.ReadString(); Headline = c.ReadString(); ExtraData = c.ReadString(); }
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 static TickByTick?Create(ResponseComposer c) { var requestId = c.ReadInt(); var tickType = c.ReadEnum <TickByTickType>(); var time = c.ReadLong(); return(tickType switch { TickByTickType.None => null as TickByTick, TickByTickType.Last => new TickByTickAllLast(requestId, tickType, time, c), TickByTickType.AllLast => new TickByTickAllLast(requestId, tickType, time, c), TickByTickType.BidAsk => new TickByTickBidAsk(requestId, tickType, time, c), TickByTickType.MidPoint => new TickByTickMidpoint(requestId, tickType, time, c), _ => throw new Exception("Invalid TickByTick type.") });
internal HistogramItem(ResponseComposer c) { Price = c.ReadDouble(); Size = c.ReadLong(); }
} // was ApiIOrderId internal OrderBound(ResponseComposer c) { OrderBoundId = c.ReadLong(); ClientId = c.ReadInt(); OrderId = c.ReadInt(); }
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(); }