/// <summary> /// Set the default options to be used when creating new socket clients /// </summary> /// <param name="options"></param> public static void SetDefaultOptions(BinanceFuturesSocketClientOptions options) { defaultOptions = options; }
public static IBinanceFuturesSocketClient CreateFuturesSocketClient(IWebsocket socket, BinanceFuturesSocketClientOptions options = null) { IBinanceFuturesSocketClient client; client = options != null ? new BinanceFuturesSocketClient(options) : new BinanceFuturesSocketClient(); client.SocketFactory = Mock.Of <IWebsocketFactory>(); Mock.Get(client.SocketFactory).Setup(f => f.CreateWebsocket(It.IsAny <Log>(), It.IsAny <string>())).Returns(socket); return(client); }
/// <summary> /// Create a new instance of BinanceSocketClient using provided options /// </summary> /// <param name="options">The options to use for this client</param> public BinanceFuturesSocketClient(BinanceFuturesSocketClientOptions options) : base(options, options.ApiCredentials == null ? null : new BinanceAuthenticationProvider(options.ApiCredentials, ArrayParametersSerialization.MultipleValues)) { baseCombinedAddress = options.BaseSocketCombinedAddress; }