Esempio n. 1
0
 internal HistoricalTick(ResponseComposer c)
 {
     Time = c.ReadLong();
     c.ReadInt(); // ?
     Price = c.ReadDouble();
     Size  = c.ReadLong();
 }
Esempio n. 2
0
 internal HistoricalLastTick(ResponseComposer c)
 {
     Time              = c.ReadLong();
     TickAttribLast    = new TickAttribLast(c.ReadInt());
     Price             = c.ReadDouble();
     Size              = c.ReadLong();
     Exchange          = c.ReadString();
     SpecialConditions = c.ReadString();
 }
Esempio n. 3
0
 internal HistoricalBidAskTick(ResponseComposer c)
 {
     Time             = c.ReadLong();
     TickAttribBidAsk = new TickAttribBidAsk(c.ReadInt());
     PriceBid         = c.ReadDouble();
     PriceAsk         = c.ReadDouble();
     SizeBid          = c.ReadLong();
     SizeAsk          = c.ReadLong();
 }
Esempio n. 4
0
 internal TickNews(ResponseComposer c)
 {
     RequestId    = c.ReadInt();
     TimeStamp    = c.ReadLong();
     ProviderCode = c.ReadString();
     ArticleId    = c.ReadString();
     Headline     = c.ReadString();
     ExtraData    = c.ReadString();
 }
Esempio n. 5
0
 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();
 }
Esempio n. 6
0
 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();
 }
Esempio n. 7
0
        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();
 }
Esempio n. 9
0
 }                           // was ApiIOrderId
 internal OrderBound(ResponseComposer c)
 {
     OrderBoundId = c.ReadLong();
     ClientId     = c.ReadInt();
     OrderId      = c.ReadInt();
 }
Esempio n. 10
0
 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();
 }