예제 #1
0
 /// <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;
 }
예제 #2
0
        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);
        }
예제 #3
0
 /// <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;
 }