Exemple #1
0
 public AccountManager(AccountsCacheService accountsCacheService,
                       IMarginTradingAccountsRepository repository,
                       IConsole console,
                       MarginSettings marginSettings,
                       IRabbitMqNotifyService rabbitMqNotifyService,
                       IAccountGroupCacheService accountGroupCacheService,
                       IClientNotifyService clientNotifyService,
                       IClientAccountClient clientAccountClient,
                       IMarginTradingAccountsRepository accountsRepository,
                       ITradingConditionsCacheService tradingConditionsCacheService,
                       ILog log,
                       OrdersCache ordersCache,
                       IEventChannel <AccountBalanceChangedEventArgs> acountBalanceChangedEventChannel,
                       ITradingEngine tradingEngine)
     : base(nameof(AccountManager), 60000, log)
 {
     _accountsCacheService = accountsCacheService;
     _clientAccountClient  = clientAccountClient;
     _repository           = repository;
     _console                       = console;
     _marginSettings                = marginSettings;
     _rabbitMqNotifyService         = rabbitMqNotifyService;
     _accountGroupCacheService      = accountGroupCacheService;
     _accountsRepository            = accountsRepository;
     _tradingConditionsCacheService = tradingConditionsCacheService;
     _log = log;
     _clientNotifyService = clientNotifyService;
     _ordersCache         = ordersCache;
     _acountBalanceChangedEventChannel = acountBalanceChangedEventChannel;
     _tradingEngine = tradingEngine;
 }
Exemple #2
0
 public AccountsController(DataReaderSettings dataReaderSettings, IMarginTradingAccountsRepository accountsRepository,
                           IMarginTradingAccountStatsRepository accountStatsRepository)
 {
     _dataReaderSettings     = dataReaderSettings;
     _accountsRepository     = accountsRepository;
     _accountStatsRepository = accountStatsRepository;
 }
Exemple #3
0
 public AccountHistoryController(
     IMarginTradingAccountsRepository accountsRepository,
     IMarginTradingAccountHistoryRepository accountsHistoryRepository,
     IMarginTradingOrdersHistoryRepository ordersHistoryRepository,
     IOrdersSnapshotReaderService ordersSnapshotReaderService)
 {
     _accountsRepository          = accountsRepository;
     _accountsHistoryRepository   = accountsHistoryRepository;
     _ordersHistoryRepository     = ordersHistoryRepository;
     _ordersSnapshotReaderService = ordersSnapshotReaderService;
 }
        public void OneTimeSetUp()
        {
            RegisterDependencies();

            _overnightSwapService                = Container.Resolve <IOvernightSwapService>();
            _overnightSwapCache                  = Container.Resolve <IOvernightSwapCache>();
            _quoteCacheService                   = Container.Resolve <IQuoteCacheService>();
            _ordersCache                         = Container.Resolve <OrdersCache>();
            _accountAssetsRepository             = Container.Resolve <IAccountAssetPairsRepository>();
            _fakeMarginTradingAccountsRepository = Container.Resolve <IMarginTradingAccountsRepository>();
            _overnightSwapStateRepository        = Container.Resolve <IOvernightSwapStateRepository>();
            _overnightSwapHistoryRepository      = Container.Resolve <IOvernightSwapHistoryRepository>();
            _rabbitMqNotifyService               = Container.Resolve <IRabbitMqNotifyService>();
            _accountAssetsManager                = Container.Resolve <AccountAssetsManager>();
            _bestPriceConsumer                   = Container.Resolve <IEventChannel <BestPriceChangeEventArgs> >();
        }