public void InitializeAPI() { binance.BinanceClient.SetDefaultOptions(new BinanceClientOptions() { ApiCredentials = new ApiCredentials(_key, _secret) }); binance.BinanceSocketClient.SetDefaultOptions(new BinanceSocketClientOptions() { ApiCredentials = new ApiCredentials(_key, _secret), }); _binanceClient = new binance.BinanceClient(); var bin = _binanceClient.StartUserStream(); if (bin.Success) { _listenKey = bin.Data; } }
/// <summary> /// Create a new instance /// </summary> /// <param name="symbol">The symbol of the order book</param> /// <param name="options">The options for the order book</param> public BinanceSymbolOrderBook(string symbol, BinanceOrderBookOptions options = null) : base(symbol, options ?? new BinanceOrderBookOptions()) { limit = options?.Limit; restClient = new BinanceClient(); socketClient = new BinanceSocketClient(); }
public BinanceSymbolOrderBook(string symbol, int?limit = null, LogVerbosity logVerbosity = LogVerbosity.Info, IEnumerable <TextWriter> logWriters = null) : base("Binance", symbol, limit == null, logVerbosity, logWriters) { this.limit = limit; restClient = new BinanceClient(); socketClient = new BinanceSocketClient(); }