private bool TryHandleTradeDetailsMessages(string message) { if (TradeDetailsMessage.TryParse(Serializer, message, out var tradeDetailsMessage)) { Streams.TradeDetailsMessageSubject.OnNext(tradeDetailsMessage); return(true); } return(false); }
private void Handle(TradeDetailsMessage msg) { if (msg.Data is null) { return; } _logger.LogInformation( msg.Data.EventType == TradeEventType.Trade ? $"Trade matched on {msg.Data.Symbol} | [orderType={msg.Data.OrderType}] [price={msg.Data.OrderPrice}] [size={msg.Data.OrderSize}] [orderId={msg.Data.OrderId}]" : $"Trade canceled on {msg.Data.Symbol} | [orderType={msg.Data.OrderType}] [price={msg.Data.OrderPrice}] [size={msg.Data.OrderSize}] [orderId={msg.Data.OrderId}]"); }