internal override void Deserialize(ResponseReader r) { base.Deserialize(r); SecType = r.ReadString(); Exchange = r.ReadString(); Symbol = r.ReadString(); }
internal HistoricalNews(ResponseReader r) { RequestId = r.ReadInt(); Time = r.ReadString(); ProviderCode = r.ReadString(); ArticleId = r.ReadString(); Headline = r.ReadString(); }
internal NewsBulletin(ResponseReader r) { r.IgnoreVersion(); MessageId = r.ReadInt(); Type = r.ReadEnum <NewsBulletinType>(); Message = r.ReadString(); Origin = r.ReadString(); }
internal TickNews(ResponseReader r) { RequestId = r.ReadInt(); TimeStamp = r.ReadLong(); ProviderCode = r.ReadString(); ArticleId = r.ReadString(); Headline = r.ReadString(); ExtraData = r.ReadString(); }
internal AccountSummary(ResponseReader r) { r.IgnoreVersion(); RequestId = r.ReadInt(); Account = r.ReadString(); Tag = r.ReadString(); Value = r.ReadString(); Currency = r.ReadString(); }
internal ScannerDataItem(ResponseReader r) { Rank = r.ReadInt(); ContractDetails = new ContractDetails(r, ContractDetailsType.ScannerContractType); Distance = r.ReadString(); Benchmark = r.ReadString(); Projection = r.ReadString(); ComboLegs = r.ReadString(); }
internal AccountUpdateMulti(ResponseReader r) { r.IgnoreVersion(); RequestId = r.ReadInt(); Account = r.ReadString(); ModelCode = r.ReadString(); Key = r.ReadString(); Value = r.ReadString(); Currency = r.ReadString(); }
internal ExchangeForPhysicalTick(ResponseReader r) { r.IgnoreVersion(); RequestId = r.ReadInt(); TickType = r.ReadEnum <TickType>(); BasisPoints = r.ReadDouble(); FormattedBasisPoints = r.ReadString(); ImpliedFuturesPrice = r.ReadDouble(); HoldDays = r.ReadInt(); FutureLastTradeDate = r.ReadString(); DividendImpact = r.ReadDouble(); DividendsToLastTradeDate = r.ReadDouble(); }
internal MarketDepthExchange(ResponseReader r) { Exchange = r.ReadString(); SecType = r.ReadString(); if (r.Builder.SupportsServerVersion(ServerVersion.SERVICE_DATA_TYPE)) { ListingExch = r.ReadString(); ServiceDataTyp = r.ReadString(); AggGroup = r.ReadIntNullable(); } else { ListingExch = ""; ServiceDataTyp = r.ReadBool() ? "Deep2" : "Deep"; } }
internal ReqParamsTick(ResponseReader r) { RequestId = r.ReadInt(); MinTick = r.ReadDouble(); BboExchange = r.ReadString(); SnapshotPermissions = r.ReadInt(); }
internal CommissionReport(ResponseReader r) { r.IgnoreVersion(); ExecutionId = r.ReadString(); Commission = r.ReadDouble(); Currency = r.ReadString(); RealizedPnl = r.ReadDouble(); Yield = r.ReadDouble(); YieldRedemptionDate = r.ReadInt(); if (Execution.Executions.TryGetValue(ExecutionId, out Execution? execution)) { Execution = execution; OrderId = execution.OrderId; RequestId = execution.RequestId; } }
internal SecurityDefinitionOptionParameter(ResponseReader r) { RequestId = r.ReadInt(); Exchange = r.ReadString(); UnderlyingContractId = r.ReadInt(); TradingClass = r.ReadString(); Multiplier = r.ReadString(); int n = r.ReadInt(); for (int i = 0; i < n; i++) { Expirations.Add(r.ReadString()); } n = r.ReadInt(); for (int i = 0; i < n; i++) { Strikes.Add(r.ReadDouble()); } }
internal HistoricalDataUpdate(ResponseReader r) { RequestId = r.ReadInt(); BarCount = r.ReadInt(); Date = r.ReadString(); Open = r.ReadDouble(); Close = r.ReadDouble(); High = r.ReadDouble(); Low = r.ReadDouble(); WAP = r.ReadDouble(); Volume = r.ReadLong(); }
internal static Alert Create(ResponseReader r) { r.RequireVersion(2); int id = r.ReadInt(); int code = r.ReadInt(); string msg = r.ReadString(); if (r.Builder.SupportsServerVersion(ServerVersion.ENCODE_MSG_ASCII7)) { msg = Regex.Unescape(msg); } return(new Alert(id, code, msg, IsFatalCode(id, code))); }
internal RealtimeBar(ResponseReader r) { r.IgnoreVersion(); RequestId = r.ReadInt(); Time = Instant.FromUnixTimeSeconds(long.Parse(r.ReadString(), NumberFormatInfo.InvariantInfo)); Open = r.ReadDouble(); High = r.ReadDouble(); Low = r.ReadDouble(); Close = r.ReadDouble(); Volume = r.ReadLong(); Wap = r.ReadDouble(); Count = r.ReadInt(); }
internal HistoricalDataBar(ResponseReader r) { Date = r.ReadLocalDateTime(HistoricalData.DateTimePattern); Open = r.ReadDouble(); High = r.ReadDouble(); Low = r.ReadDouble(); Close = r.ReadDouble(); Volume = r.ReadLong(); WeightedAveragePrice = r.ReadDouble(); if (!r.Builder.SupportsServerVersion(ServerVersion.SYNT_REALTIME_BARS)) { r.ReadString(); /*string hasGaps = */ } Count = r.ReadInt(); }
internal MarketDepth(ResponseReader r, bool isLevel2) { r.IgnoreVersion(); RequestId = r.ReadInt(); Position = r.ReadInt(); MarketMaker = isLevel2 ? r.ReadString() : string.Empty; Operation = r.ReadEnum <MarketDepthOperation>(); Side = r.ReadEnum <MarketDepthSide>(); Price = r.ReadDouble(); Size = r.ReadLong(); if (isLevel2 && r.Builder.SupportsServerVersion(ServerVersion.SMART_DEPTH)) { IsSmartDepth = r.ReadBool(); } }
internal static Tick Create(ResponseReader r) { r.IgnoreVersion(); int requestId = r.ReadInt(); TickType tickType = r.ReadEnum <TickType>(); string str = r.ReadString(); if (tickType == TickType.RealtimeVolume) { return(new RealtimeVolumeTick(requestId, str)); } if (tickType == TickType.LastTimeStamp) { return(new TimeTick(requestId, str)); } return(new StringTick(requestId, tickType, str)); }
internal OrderStatusReport(ResponseReader r) { if (!r.Builder.SupportsServerVersion(ServerVersion.MARKET_CAP_PRICE)) { r.IgnoreVersion(); } OrderId = r.ReadInt(); Status = r.ReadStringEnum <OrderStatus>(); Filled = r.ReadDouble(); Remaining = r.ReadDouble(); AverageFillPrice = r.ReadDouble(); PermanentId = r.ReadInt(); ParentId = r.ReadInt(); LastFillPrice = r.ReadDouble(); ClientId = r.ReadInt(); WhyHeld = r.ReadString(); if (r.Builder.SupportsServerVersion(ServerVersion.MARKET_CAP_PRICE)) { MktCapPrice = r.ReadDouble(); } }
internal FinancialAdvisor(ResponseReader r) { r.IgnoreVersion(); DataType = r.ReadEnum <FinancialAdvisorDataType>(); Data = r.ReadString(); }
internal NewsArticle(ResponseReader r) { RequestId = r.ReadInt(); ArticleType = r.ReadInt(); ArticleText = r.ReadString(); }
internal VerifyMessageApi(ResponseReader r) { r.IgnoreVersion(); Data = r.ReadString(); }
internal VerifyAndAuthorizeMessageApi(ResponseReader r) { r.IgnoreVersion(); ApiData = r.ReadString(); XyzChallenge = r.ReadString(); }
internal VerifyAndAuthorizeCompleted(ResponseReader r) { r.IgnoreVersion(); IsSuccessful = r.ReadBool(); ErrorText = r.ReadString(); }
internal ReplaceFAEnd(ResponseReader reader) { RequestId = reader.ReadInt(); Text = reader.ReadString(); }
internal NewsProvider(ResponseReader r) { Code = r.ReadString(); Name = r.ReadString(); }
internal override void Deserialize(ResponseReader r) { base.Deserialize(r); IsMore = r.ReadBool(); Value = r.ReadString(); }
internal void Set(ResponseReader r) { Name = r.ReadString(); Value = r.ReadString(); DisplayName = r.ReadString(); }
internal HeadTimestamp(ResponseReader r) { RequestId = r.ReadInt(); HeadTimeStamp = r.ReadString(); }
internal RerouteMktDepth(ResponseReader r) { RequestId = r.ReadInt(); ContractId = r.ReadInt(); Exchange = r.ReadString(); }