示例#1
0
 public Application(
     IRabbitMqNotifyService rabbitMqNotifyService,
     IConsole consoleWriter,
     MarketMakerService marketMakerService,
     ILog logger,
     MarginSettings marginSettings,
     IMaintenanceModeService maintenanceModeService,
     IRabbitMqService rabbitMqService,
     MatchingEngineRoutesManager matchingEngineRoutesManager,
     IMigrationService migrationService,
     IConvertService convertService,
     ExternalOrderBooksList externalOrderBooksList)
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _consoleWriter         = consoleWriter;
     _marketMakerService    = marketMakerService;
     _logger                      = logger;
     _marginSettings              = marginSettings;
     _maintenanceModeService      = maintenanceModeService;
     _rabbitMqService             = rabbitMqService;
     _matchingEngineRoutesManager = matchingEngineRoutesManager;
     _migrationService            = migrationService;
     _convertService              = convertService;
     _externalOrderBooksList      = externalOrderBooksList;
 }
示例#2
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;
 }
示例#3
0
 public AccountManager(
     AccountsCacheService accountsCacheService,
     MarginTradingSettings marginSettings,
     IRabbitMqNotifyService rabbitMqNotifyService,
     ILog log,
     OrdersCache ordersCache,
     ITradingEngine tradingEngine,
     IAccountsApi accountsApi,
     IAccountBalanceHistoryApi accountBalanceHistoryApi,
     IConvertService convertService,
     IDateService dateService,
     ISystemClock systemClock,
     IAccountMarginFreezingRepository accountMarginFreezingRepository,
     IAccountMarginUnconfirmedRepository accountMarginUnconfirmedRepository)
     : base(nameof(AccountManager), 60000, log)
 {
     _accountsCacheService  = accountsCacheService;
     _marginSettings        = marginSettings;
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _log                                = log;
     _ordersCache                        = ordersCache;
     _tradingEngine                      = tradingEngine;
     _accountsApi                        = accountsApi;
     _accountBalanceHistoryApi           = accountBalanceHistoryApi;
     _convertService                     = convertService;
     _dateService                        = dateService;
     _systemClock                        = systemClock;
     _accountMarginFreezingRepository    = accountMarginFreezingRepository;
     _accountMarginUnconfirmedRepository = accountMarginUnconfirmedRepository;
 }
示例#4
0
 public PositionsConsumer(OrdersCache ordersCache,
                          IRabbitMqNotifyService rabbitMqNotifyService,
                          IConvertService convertService,
                          IDateService dateService,
                          IAccountsCacheService accountsCacheService,
                          IAccountUpdateService accountUpdateService,
                          IIdentityGenerator identityGenerator,
                          ICqrsSender cqrsSender,
                          IEventChannel <OrderCancelledEventArgs> orderCancelledEventChannel,
                          IEventChannel <OrderChangedEventArgs> orderChangedEventChannel,
                          IEventChannel <OrderActivatedEventArgs> orderActivatedEventChannel,
                          IMatchingEngineRouter meRouter,
                          ILog log)
 {
     _ordersCache                = ordersCache;
     _rabbitMqNotifyService      = rabbitMqNotifyService;
     _convertService             = convertService;
     _dateService                = dateService;
     _accountsCacheService       = accountsCacheService;
     _accountUpdateService       = accountUpdateService;
     _identityGenerator          = identityGenerator;
     _cqrsSender                 = cqrsSender;
     _orderCancelledEventChannel = orderCancelledEventChannel;
     _orderChangedEventChannel   = orderChangedEventChannel;
     _orderActivatedEventChannel = orderActivatedEventChannel;
     _meRouter = meRouter;
     _log      = log;
 }
示例#5
0
 public UpdatedAccountsStatsConsumer(IAccountsCacheService accountsCacheService,
                                     MarginSettings marginSettings,
                                     IRabbitMqNotifyService rabbitMqNotifyService)
 {
     _accountsCacheService  = accountsCacheService;
     _marginSettings        = marginSettings;
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }
示例#6
0
 public RfqExecutionInfoRepositoryDecorator(IOperationExecutionInfoRepository decoratee,
                                            ILog log,
                                            IRabbitMqNotifyService notifyService,
                                            MarginTradingSettings settings)
 {
     _decoratee     = decoratee;
     _log           = log;
     _notifyService = notifyService;
     _brokerId      = settings.BrokerId;
 }
示例#7
0
 public OrderStateConsumer(IRabbitMqNotifyService rabbitMqNotifyService,
                           OrdersCache ordersCache,
                           IDateService dateService,
                           IEventChannel <OrderCancelledEventArgs> orderCancelledEventChannel,
                           IEventChannel <OrderChangedEventArgs> orderChangedEventChannel)
 {
     _rabbitMqNotifyService      = rabbitMqNotifyService;
     _ordersCache                = ordersCache;
     _dateService                = dateService;
     _orderCancelledEventChannel = orderCancelledEventChannel;
     _orderChangedEventChannel   = orderChangedEventChannel;
 }
示例#8
0
 public ClientNotifyService(
     IRabbitMqNotifyService rabbitMqNotifyService,
     IMarginTradingOperationsLogService operationsLogService,
     MarginSettings marginSettings,
     IConsole consoleWriter,
     IAccountsCacheService accountsCacheService)
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _operationsLogService  = operationsLogService;
     _marginSettings        = marginSettings;
     _consoleWriter         = consoleWriter;
     _accountsCacheService  = accountsCacheService;
 }
示例#9
0
        public StopOutConsumer(IThreadSwitcher threadSwitcher,
                               IOperationsLogService operationsLogService,
                               IRabbitMqNotifyService rabbitMqNotifyService,
                               IDateService dateService,
                               MarginTradingSettings settings)
        {
            _threadSwitcher        = threadSwitcher;
            _operationsLogService  = operationsLogService;
            _rabbitMqNotifyService = rabbitMqNotifyService;
            _dateService           = dateService;

            _settings = settings;
        }
示例#10
0
 public MarginCallConsumer(IThreadSwitcher threadSwitcher,
                           IEmailService emailService,
                           IClientAccountService clientAccountService,
                           IOperationsLogService operationsLogService,
                           MarginTradingSettings settings,
                           IRabbitMqNotifyService rabbitMqNotifyService,
                           IDateService dateService)
 {
     _threadSwitcher        = threadSwitcher;
     _emailService          = emailService;
     _clientAccountService  = clientAccountService;
     _operationsLogService  = operationsLogService;
     _settings              = settings;
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _dateService           = dateService;
 }
示例#11
0
 public StpMatchingEngine(string id,
                          ExternalOrderBooksList externalOrderBooksList,
                          IExchangeConnectorService exchangeConnectorService,
                          ILog log,
                          IDateService dateService,
                          IRabbitMqNotifyService rabbitMqNotifyService,
                          IAssetPairsCache assetPairsCache)
 {
     _externalOrderBooksList   = externalOrderBooksList;
     _exchangeConnectorService = exchangeConnectorService;
     _log                   = log;
     _dateService           = dateService;
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _assetPairsCache       = assetPairsCache;
     Id = id;
 }
示例#12
0
        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> >();
        }
示例#13
0
 public MarginCallConsumer(IThreadSwitcher threadSwitcher,
                           IAppNotifications appNotifications,
                           IEmailService emailService,
                           IClientAccountService clientAccountService,
                           IMarginTradingOperationsLogService operationsLogService,
                           IRabbitMqNotifyService rabbitMqNotifyService,
                           IDateService dateService,
                           IAssetsCache assetsCache)
     : base(appNotifications, clientAccountService, assetsCache)
 {
     _threadSwitcher        = threadSwitcher;
     _emailService          = emailService;
     _clientAccountService  = clientAccountService;
     _operationsLogService  = operationsLogService;
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _dateService           = dateService;
 }
示例#14
0
 public OrderStateConsumer(IThreadSwitcher threadSwitcher,
                           IClientNotifyService clientNotifyService,
                           IAccountsCacheService accountsCacheService,
                           IAppNotifications appNotifications,
                           IClientAccountService clientAccountService,
                           AccountManager accountManager,
                           IRabbitMqNotifyService rabbitMqNotifyService,
                           IAssetsCache assetsCache)
     : base(appNotifications,
            clientAccountService,
            assetsCache)
 {
     _threadSwitcher        = threadSwitcher;
     _clientNotifyService   = clientNotifyService;
     _accountsCacheService  = accountsCacheService;
     _accountManager        = accountManager;
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }
示例#15
0
 public Application(
     IRabbitMqNotifyService rabbitMqNotifyService,
     IConsole consoleWriter,
     MarketMakerService marketMakerService,
     ILog logger,
     MarginTradingSettings marginSettings,
     IMaintenanceModeService maintenanceModeService,
     IRabbitMqService rabbitMqService,
     MatchingEngineRoutesManager matchingEngineRoutesManager,
     IMigrationService migrationService,
     IConvertService convertService,
     IFxRateCacheService fxRateCacheService,
     IExternalOrderbookService externalOrderbookService,
     IAssetsManager assetsManager,
     IAssetPairsManager assetPairsManager,
     ITradingInstrumentsManager tradingInstrumentsManager,
     ITradingConditionsManager tradingConditionsManager,
     IScheduleSettingsCacheService scheduleSettingsCacheService,
     IOvernightMarginService overnightMarginService,
     IThreadSwitcher threadSwitcher)
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _consoleWriter         = consoleWriter;
     _marketMakerService    = marketMakerService;
     _logger                       = logger;
     _marginSettings               = marginSettings;
     _maintenanceModeService       = maintenanceModeService;
     _rabbitMqService              = rabbitMqService;
     _matchingEngineRoutesManager  = matchingEngineRoutesManager;
     _migrationService             = migrationService;
     _convertService               = convertService;
     _fxRateCacheService           = fxRateCacheService;
     _externalOrderbookService     = externalOrderbookService;
     _assetsManager                = assetsManager;
     _assetPairsManager            = assetPairsManager;
     _tradingInstrumentsManager    = tradingInstrumentsManager;
     _tradingConditionsManager     = tradingConditionsManager;
     _scheduleSettingsCacheService = scheduleSettingsCacheService;
     _overnightMarginService       = overnightMarginService;
     _threadSwitcher               = threadSwitcher;
 }
示例#16
0
 public StpMatchingEngine(string id,
                          IExternalOrderbookService externalOrderbookService,
                          IExchangeConnectorService exchangeConnectorService,
                          ILog log,
                          IOperationsLogService operationsLogService,
                          IDateService dateService,
                          IRabbitMqNotifyService rabbitMqNotifyService,
                          IAssetPairsCache assetPairsCache,
                          MarginTradingSettings marginTradingSettings,
                          IQuoteCacheService quoteCacheService)
 {
     _externalOrderbookService = externalOrderbookService;
     _exchangeConnectorService = exchangeConnectorService;
     _log = log;
     _operationsLogService  = operationsLogService;
     _dateService           = dateService;
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _assetPairsCache       = assetPairsCache;
     _marginTradingSettings = marginTradingSettings;
     _quoteCacheService     = quoteCacheService;
     Id = id;
 }
 public UpdatedAccountsStatsConsumer(IAccountsCacheService accountsCacheService,
                                     IRabbitMqNotifyService rabbitMqNotifyService)
 {
     _accountsCacheService  = accountsCacheService;
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }
示例#18
0
 public TradesConsumer(IRabbitMqNotifyService rabbitMqNotifyService)
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }
示例#19
0
 public PricesUpdateRabbitMqNotifier(
     IRabbitMqNotifyService rabbitMqNotifyService
     )
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }