Ejemplo n.º 1
0
        public async Task GetSymbolsAsync()
        {
            // Act
            _api.Login();
            IReadOnlyList <SymbolModel> symbols = await _api.GetSymbolsAsync()
                                                  .ConfigureAwait(false);

            _api.Logout();

            Assert.IsNotNull(symbols);
            Assert.AreNotEqual(0, symbols.Count);
        }
Ejemplo n.º 2
0
        public override void GetMarketData(ProviderModel provider, Action <object> update)
        {
            DateTime now = DateTime.Now;

            if (!_symbolsUpdated)
            {
                IReadOnlyList <SymbolModel> symbols = _api.GetSymbolsAsync().Result;
                UpdateSymbols(provider, symbols, true);
                update(provider.Symbols);
                _symbolsUpdated = true;
                _api.SubscribeMarketDataAsync(provider.Symbols, update).Wait();
            }

            provider.LastDate = now;
        }
Ejemplo n.º 3
0
 public override void GetMarketData(ProviderModel provider, Action <object> update)
 {
     IReadOnlyList <SymbolModel> symbols = _api.GetSymbolsAsync(update).Result;
 }