private bool HandleObjectMessage(string msg) { var response = BitmexJsonSerializer.Deserialize <JObject>(msg); // ******************** // ADD OBJECT HANDLERS BELOW // ******************** return (TradeResponse.TryHandle(response, Streams.TradesSubject) || TradeBinResponse.TryHandle(response, Streams.TradeBinSubject) || BookResponse.TryHandle(response, Streams.BookSubject) || QuoteResponse.TryHandle(response, Streams.QuoteSubject) || LiquidationResponse.TryHandle(response, Streams.LiquidationSubject) || PositionResponse.TryHandle(response, Streams.PositionSubject) || OrderResponse.TryHandle(response, Streams.OrderSubject) || WalletResponse.TryHandle(response, Streams.WalletSubject) || ErrorResponse.TryHandle(response, Streams.ErrorSubject) || SubscribeResponse.TryHandle(response, Streams.SubscribeSubject) || InfoResponse.TryHandle(response, Streams.InfoSubject) || AuthenticationResponse.TryHandle(response, Streams.AuthenticationSubject)); }
private bool HandleObjectMessage(string msg) { // ******************** // ADD OBJECT HANDLERS BELOW // ******************** return (ErrorResponse.TryHandle(msg, Streams.ErrorSubject) || SubscribeResponse.TryHandle(msg, Streams.SubscribeSubject) || BookResponse.TryHandle(msg, Streams.BookSubject) || TradeResponse.TryHandle(msg, Streams.TradesSubject) || QuoteResponse.TryHandle(msg, Streams.QuoteSubject) || LiquidationResponse.TryHandle(msg, Streams.LiquidationSubject) || PositionResponse.TryHandle(msg, Streams.PositionSubject) || MarginResponse.TryHandle(msg, Streams.MarginSubject) || OrderResponse.TryHandle(msg, Streams.OrderSubject) || WalletResponse.TryHandle(msg, Streams.WalletSubject) || ExecutionResponse.TryHandle(msg, Streams.ExecutionSubject) || FundingResponse.TryHandle(msg, Streams.FundingsSubject) || InstrumentResponse.TryHandle(msg, Streams.InstrumentSubject) || TradeBinResponse.TryHandle(msg, Streams.TradeBinSubject) || InfoResponse.TryHandle(msg, Streams.InfoSubject) || AuthenticationResponse.TryHandle(msg, Streams.AuthenticationSubject)); }
/// <summary> /// Handles object messages sent by bitmex. /// </summary> /// <param name="msg">The MSG.</param> /// <param name="streams">The streams.</param> /// <returns></returns> public static bool HandleObjectMessage(string msg, BitmexClientStreams streams) { var response = BitmexJsonSerializer.Deserialize <JObject>(msg); // ******************** // ADD OBJECT HANDLERS BELOW // ******************** return (TradeResponse.TryHandle(response, streams.TradesSubject) || TradeBinResponse.TryHandle(response, streams.TradeBinSubject) || BookResponse.TryHandle(response, streams.BookSubject) || QuoteResponse.TryHandle(response, streams.QuoteSubject) || LiquidationResponse.TryHandle(response, streams.LiquidationSubject) || PositionResponse.TryHandle(response, streams.PositionSubject) || MarginResponse.TryHandle(response, streams.MarginSubject) || OrderResponse.TryHandle(response, streams.OrderSubject) || WalletResponse.TryHandle(response, streams.WalletSubject) || InstrumentResponse.TryHandle(response, streams.InstrumentSubject) || ExecutionResponse.TryHandle(response, streams.ExecutionSubject) || FundingResponse.TryHandle(response, streams.FundingsSubject) || ErrorResponse.TryHandle(response, streams.ErrorSubject) || SubscribeResponse.TryHandle(response, streams.SubscribeSubject) || InfoResponse.TryHandle(response, streams.InfoSubject) || AuthenticationResponse.TryHandle(response, streams.AuthenticationSubject)); }
private bool HandleObjectMessage(string msg) { var response = BinanceJsonSerializer.Deserialize <JObject>(msg); // ******************** // ADD OBJECT HANDLERS BELOW // ******************** return (TradeResponse.TryHandle(response, Streams.TradesSubject) || AggregatedTradeResponse.TryHandle(response, Streams.TradeBinSubject) || OrderBookPartialResponse.TryHandle(response, Streams.OrderBookPartialSubject) || OrderBookDiffResponse.TryHandle(response, Streams.OrderBookDiffSubject) ); }
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)); }
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); }