예제 #1
0
 internal override void Deserialize(ResponseReader r)
 {
     base.Deserialize(r);
     SecType  = r.ReadString();
     Exchange = r.ReadString();
     Symbol   = r.ReadString();
 }
예제 #2
0
 internal HistoricalNews(ResponseReader r)
 {
     RequestId    = r.ReadInt();
     Time         = r.ReadString();
     ProviderCode = r.ReadString();
     ArticleId    = r.ReadString();
     Headline     = r.ReadString();
 }
예제 #3
0
 internal NewsBulletin(ResponseReader r)
 {
     r.IgnoreVersion();
     MessageId = r.ReadInt();
     Type      = r.ReadEnum <NewsBulletinType>();
     Message   = r.ReadString();
     Origin    = r.ReadString();
 }
예제 #4
0
 internal TickNews(ResponseReader r)
 {
     RequestId    = r.ReadInt();
     TimeStamp    = r.ReadLong();
     ProviderCode = r.ReadString();
     ArticleId    = r.ReadString();
     Headline     = r.ReadString();
     ExtraData    = r.ReadString();
 }
예제 #5
0
 internal AccountSummary(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     Account   = r.ReadString();
     Tag       = r.ReadString();
     Value     = r.ReadString();
     Currency  = r.ReadString();
 }
예제 #6
0
 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();
 }
예제 #7
0
 internal AccountUpdateMulti(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     Account   = r.ReadString();
     ModelCode = r.ReadString();
     Key       = r.ReadString();
     Value     = r.ReadString();
     Currency  = r.ReadString();
 }
예제 #8
0
파일: Ticks.cs 프로젝트: dshe/InterReact
 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();
 }
예제 #9
0
 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";
     }
 }
예제 #10
0
 internal ReqParamsTick(ResponseReader r)
 {
     RequestId           = r.ReadInt();
     MinTick             = r.ReadDouble();
     BboExchange         = r.ReadString();
     SnapshotPermissions = r.ReadInt();
 }
예제 #11
0
    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());
        }
    }
예제 #13
0
 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();
 }
예제 #14
0
    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)));
    }
예제 #15
0
 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();
 }
예제 #16
0
 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();
 }
예제 #17
0
 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();
     }
 }
예제 #18
0
파일: Ticks.cs 프로젝트: dshe/InterReact
    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));
    }
예제 #19
0
    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();
        }
    }
예제 #20
0
 internal FinancialAdvisor(ResponseReader r)
 {
     r.IgnoreVersion();
     DataType = r.ReadEnum <FinancialAdvisorDataType>();
     Data     = r.ReadString();
 }
예제 #21
0
 internal NewsArticle(ResponseReader r)
 {
     RequestId   = r.ReadInt();
     ArticleType = r.ReadInt();
     ArticleText = r.ReadString();
 }
예제 #22
0
 internal VerifyMessageApi(ResponseReader r)
 {
     r.IgnoreVersion();
     Data = r.ReadString();
 }
예제 #23
0
 internal VerifyAndAuthorizeMessageApi(ResponseReader r)
 {
     r.IgnoreVersion();
     ApiData      = r.ReadString();
     XyzChallenge = r.ReadString();
 }
예제 #24
0
 internal VerifyAndAuthorizeCompleted(ResponseReader r)
 {
     r.IgnoreVersion();
     IsSuccessful = r.ReadBool();
     ErrorText    = r.ReadString();
 }
예제 #25
0
 internal ReplaceFAEnd(ResponseReader reader)
 {
     RequestId = reader.ReadInt();
     Text      = reader.ReadString();
 }
예제 #26
0
 internal NewsProvider(ResponseReader r)
 {
     Code = r.ReadString();
     Name = r.ReadString();
 }
예제 #27
0
 internal override void Deserialize(ResponseReader r)
 {
     base.Deserialize(r);
     IsMore = r.ReadBool();
     Value  = r.ReadString();
 }
예제 #28
0
 internal void Set(ResponseReader r)
 {
     Name        = r.ReadString();
     Value       = r.ReadString();
     DisplayName = r.ReadString();
 }
예제 #29
0
 internal HeadTimestamp(ResponseReader r)
 {
     RequestId     = r.ReadInt();
     HeadTimeStamp = r.ReadString();
 }
예제 #30
0
 internal RerouteMktDepth(ResponseReader r)
 {
     RequestId  = r.ReadInt();
     ContractId = r.ReadInt();
     Exchange   = r.ReadString();
 }