private bool HandleObjectMessage(string msg)
 {
     // ********************
     // ADD OBJECT HANDLERS BELOW
     // ********************
     //var response = FtxJsonSerializer.Deserialize<JObject>(msg);
     return
         (SubscribedResponse.TryHandle(msg, Streams.SubscribedSubject) ||
          ErrorResponse.TryHandle(msg, Streams.ErrorSubject) ||
          PongResponse.TryHandle(msg, Streams.PongSubject) ||
          TickerResponse.TryHandle(msg, Streams.TickerSubject) ||
          OrderBookUpdateResponse.TryHandle(msg, Streams.OrderBookUpdateSubject, "update") ||
          OrderBookSnapshotResponse.TryHandle(msg, Streams.OrderBookSnapshotSubject, "partial") ||
          // MarketsUpdateResponse.TryHandle(msg, Streams.MarketsUpdateSubject, "update") ||
          // MarketsSnapshotResponse.TryHandle(msg, Streams.MarketsSnapshotSubject, "partial") ||
          MarketsResponse.TryHandle(msg, Streams.MarketsSubject) ||
          TradeResponse.TryHandle(msg, Streams.TradesSubject) ||
          OrdersResponse.TryHandle(msg, Streams.OrdersSubject) ||
          FillsResponse.TryHandle(msg, Streams.FillsSubject));
 }
Exemplo n.º 2
0
        private bool HandleObjectMessage(string msg)
        {
            var response = CoinbaseJsonSerializer.Deserialize <JObject>(msg);

            // ********************
            // ADD OBJECT HANDLERS BELOW
            // ********************

            return

                (HeartbeatResponse.TryHandle(response, Streams.HeartbeatSubject) ||
                 TradeResponse.TryHandle(response, Streams.TradesSubject) ||
                 OrderBookUpdateResponse.TryHandle(response, Streams.OrderBookUpdateSubject) ||
                 OrderBookSnapshotResponse.TryHandle(response, Streams.OrderBookSnapshotSubject) ||
                 TickerResponse.TryHandle(response, Streams.TickerSubject) ||

                 ErrorResponse.TryHandle(response, Streams.ErrorSubject) ||
                 SubscribeResponse.TryHandle(response, Streams.SubscribeSubject) ||

                 false);
        }