コード例 #1
0
        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;
            }
        }
コード例 #2
0
 /// <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();
 }
コード例 #3
0
 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();
 }