Exemplo n.º 1
0
        public OrderManager(Credentials creds)
        {
            m_creds  = creds;
            m_orders = new XOrderList();

            // BINANCE Client (and Websocket Client)
            var cred = m_creds["BINANCE"];
            var opt  = new BinanceClientOptions();

            opt.ApiCredentials = new ApiCredentials(cred.Key, cred.Secret);
            m_bina             = new BinanceClient(opt);

            BinanceWebsocket.SetCredentials(cred.Key, cred.Secret);
            m_binaSocket = BinanceWebsocket.Instance;

            /*var sopt = new Binance.Net.BinanceSocketClientOptions();
             * sopt.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials(m_creds["BINANCE"].Key, m_creds["BINANCE"].Secret);
             * m_sbina = new Binance.Net.BinanceSocketClient(sopt);
             * m_binaTick = new ConcurrentDictionary<string, BinanceStreamTick>();
             * GetBinanceTickers();
             * GetBinanceAccountInfo();
             * StartWebsockets();*/

            // BITTREX Client (and Websocket Client)
            // ...Bittrex initialization code goes here...

            // POLONIEX Client
            // ...Poloniex initialization code goes here...
        }
Exemplo n.º 2
0
        public BinanceWebsocketTests()
        {
            _channels = new List <string>
            {
                BinanceWebsocketStreams.AllMarketTickersStream,
                BinanceWebsocketStreams.AllBookTickersStream
            };

            _ws = new BinanceWebsocket(HandleClose, _channels);
        }