Beispiel #1
0
 internal MarketDataTypeTick(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId      = r.ReadInt();
     TickType       = TickType.MarketDataType;
     MarketDataType = r.ReadEnum <MarketDataType>();
 }
Beispiel #2
0
 internal SizeTick(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     TickType  = r.ReadEnum <TickType>();
     Size      = r.ReadLong();
 }
Beispiel #3
0
 internal NewsBulletin(ResponseReader r)
 {
     r.IgnoreVersion();
     MessageId = r.ReadInt();
     Type      = r.ReadEnum <NewsBulletinType>();
     Message   = r.ReadString();
     Origin    = r.ReadString();
 }
Beispiel #4
0
 internal AccountSummary(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     Account   = r.ReadString();
     Tag       = r.ReadString();
     Value     = r.ReadString();
     Currency  = r.ReadString();
 }
Beispiel #5
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();
 }
Beispiel #6
0
    internal static Tick Create(ResponseReader r)
    {
        r.IgnoreVersion();
        int      requestId = r.ReadInt();
        TickType tickType  = r.ReadEnum <TickType>();
        double   value     = r.ReadDouble();

        if (tickType == TickType.Halted)
        {
            return(new HaltedTick(requestId, tickType, value == 0 ? HaltType.NotHalted : HaltType.GeneralHalt));
        }
        return(new GenericTick(requestId, tickType, value));
    }
Beispiel #7
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();
 }
Beispiel #8
0
 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();
 }
Beispiel #9
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();
     }
 }
Beispiel #10
0
    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));
    }
Beispiel #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;
        }
    }
Beispiel #12
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();
        }
    }
Beispiel #13
0
 internal ContractDetailsEnd(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
 }
Beispiel #14
0
 internal DisplayGroupUpdate(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId    = r.ReadInt();
     ContractInfo = r.ReadString();
 }
Beispiel #15
0
 internal FundamentalData(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     Data      = r.ReadString();
 }
Beispiel #16
0
 internal DisplayGroups(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
     Groups    = r.ReadString();
 }
Beispiel #17
0
 internal SnapshotEndTick(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
 }
Beispiel #18
0
 internal ExecutionEnd(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
 }
Beispiel #19
0
 internal ScannerParameters(ResponseReader r)
 {
     r.IgnoreVersion();
     Parameters = r.ReadString();
 }
Beispiel #20
0
 internal AccountPositionMultiEnd(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
 }
Beispiel #21
0
 internal ManagedAccounts(ResponseReader r)
 {
     r.IgnoreVersion();
     Accounts = r.ReadString();
 }
Beispiel #22
0
 internal FinancialAdvisor(ResponseReader r)
 {
     r.IgnoreVersion();
     DataType = r.ReadEnum <FinancialAdvisorDataType>();
     Data     = r.ReadString();
 }
Beispiel #23
0
 internal NextId(ResponseReader r)
 {
     r.IgnoreVersion();
     Id = r.ReadInt();
 }
Beispiel #24
0
 internal VerifyMessageApi(ResponseReader r)
 {
     r.IgnoreVersion();
     Data = r.ReadString();
 }
Beispiel #25
0
 internal VerifyAndAuthorizeMessageApi(ResponseReader r)
 {
     r.IgnoreVersion();
     ApiData      = r.ReadString();
     XyzChallenge = r.ReadString();
 }
Beispiel #26
0
 internal VerifyAndAuthorizeCompleted(ResponseReader r)
 {
     r.IgnoreVersion();
     IsSuccessful = r.ReadBool();
     ErrorText    = r.ReadString();
 }
Beispiel #27
0
 internal AccountSummaryEnd(ResponseReader r)
 {
     r.IgnoreVersion();
     RequestId = r.ReadInt();
 }
Beispiel #28
0
 internal CurrentTime(ResponseReader r)
 {
     r.IgnoreVersion();
     Time = Instant.FromUnixTimeSeconds(long.Parse(r.ReadString(), NumberFormatInfo.InvariantInfo));
 }