示例#1
0
 public async Task StartActives()
 {
     foreach (var activeInstrument in (await _instrumentsAccessService.GetAllAsync()).Where(x =>
                                                                                            x.State == InstrumentState.Active))
     {
         await Start(activeInstrument.AssetPair);
     }
 }
        public async Task <IReadOnlyList <Price> > GetActiveAsync(OrderType type)
        {
            var activeInstruments = (await _instrumentsAccessService.GetAllAsync())
                                    .Where(x => x.State == InstrumentState.Active);

            var prices = new List <Price>();

            foreach (var instrument in activeInstruments)
            {
                var lastPrice = await GetLatestAsync(instrument.AssetPair, type);

                if (lastPrice != null)
                {
                    prices.Add(lastPrice);
                }
            }

            return(prices);
        }
示例#3
0
 public Task <IReadOnlyCollection <Instrument> > GetAllAsync()
 {
     return(_instrumentsAccessService.GetAllAsync());
 }