Example #1
0
        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));
        }
Example #2
0
 public async Task <List <AccountAssetPairContract> > List()
 {
     return((await _accountAssetPairsRepository.GetAllAsync()).Select(Convert).ToList());
 }
Example #3
0
        public async Task UpdateAccountAssetsCache()
        {
            var accountAssets = (await _pairsRepository.GetAllAsync()).ToList();

            _accountAssetsCacheService.InitAccountAssetsCache(accountAssets);
        }