public void SetUp() { _accountAssetsRepository.GetAllAsync().Result.ForEach(aa => _accountAssetsRepository.Remove(aa.TradingConditionId, aa.BaseAssetId, "BTCUSD")); _accountAssetsManager.UpdateAccountAssetsCache().GetAwaiter().GetResult(); _ordersCache.InitOrders(new List <Order>()); _overnightSwapCache.ClearAll(); _quoteCacheService.GetAllQuotes().Values.ForEach(x => _quoteCacheService.RemoveQuote(x.Instrument)); _overnightSwapHistoryRepository.GetAsync().Result.ForEach(x => _overnightSwapHistoryRepository.DeleteAsync(x)); }
public async Task <List <AccountAssetPairContract> > List() { return((await _accountAssetPairsRepository.GetAllAsync()).Select(Convert).ToList()); }
public async Task UpdateAccountAssetsCache() { var accountAssets = (await _pairsRepository.GetAllAsync()).ToList(); _accountAssetsCacheService.InitAccountAssetsCache(accountAssets); }