WebSocketClientOnMessageReceived(object sender, GdaxWebSocketMessageEventArgs eventArgs) { dynamic m = eventArgs.Message; string type = m.type; switch (type) { case "received": ProcessReceivedMessage(eventArgs.Message); break; case "open": ProcessOpenMessage(eventArgs.Message); break; case "done": ProcessDoneMessage(eventArgs.Message); break; case "match": ProcessMatchMessage(eventArgs.Message); break; case "change": ProcessChangeMessage(eventArgs.Message); break; default: return; } }
void SocketMessageReceived(object sender, GdaxWebSocketMessageEventArgs e) { if (e.Message["product_id"].ToString() == _instrument.Symbol) { if (_bookBuildingInProgress) { _pending.Enqueue(e.Message); } else { ProcessLiveOrderMessage(e.Message); } } }