public WebSocketSubscribeInfo(SocketSubscribeType type, Ticker ticker) { Type = type; Ticker = ticker; Command = new WebSocketCommandInfo(); if (Ticker != null) { channel = Ticker.Name; } }
public SocketConnectionInfo(Exchange exchange, Ticker ticker, string address, SocketType socketType, SocketSubscribeType connType) { if (connType == SocketSubscribeType.OrderBook || connType == SocketSubscribeType.TradeHistory || connType == SocketSubscribeType.Kline) { if (ticker == null) { throw new Exception("Ticker should not be null"); } } Ticker = ticker; Exchange = exchange; Name = ticker == null ? Exchange.Name : ticker.Name; Type = connType; SocketType = socketType; Address = address; }
public SocketConnectionInfo(string name, SocketSubscribeType type) { Name = name; Type = type; }