示例#1
0
 public MtController(
     IMarginTradingAccountHistoryRepository accountsHistoryRepository,
     IMarginTradingOrdersHistoryRepository ordersHistoryRepository,
     IMicrographCacheService micrographCacheService,
     IAccountAssetsCacheService accountAssetsCacheService,
     IAssetPairsCache assetPairsCache,
     IMarketMakerMatchingEngine matchingEngine,
     ITradingEngine tradingEngine,
     IAccountsCacheService accountsCacheService,
     IMarginTradingOperationsLogService operationsLogService,
     IConsole consoleWriter,
     OrdersCache ordersCache,
     MarginSettings marginSettings,
     AccountManager accountManager,
     IAssetPairDayOffService assetDayOffService,
     IQuoteCacheService quoteCacheService)
 {
     _accountsHistoryRepository = accountsHistoryRepository;
     _ordersHistoryRepository   = ordersHistoryRepository;
     _micrographCacheService    = micrographCacheService;
     _accountAssetsCacheService = accountAssetsCacheService;
     _assetPairsCache           = assetPairsCache;
     _matchingEngine            = matchingEngine;
     _tradingEngine             = tradingEngine;
     _accountsCacheService      = accountsCacheService;
     _operationsLogService      = operationsLogService;
     _consoleWriter             = consoleWriter;
     _ordersCache        = ordersCache;
     _marginSettings     = marginSettings;
     _accountManager     = accountManager;
     _assetDayOffService = assetDayOffService;
     _quoteCacheService  = quoteCacheService;
 }
示例#2
0
 public CfdCalculatorService(
     IAssetPairsCache assetPairsCache,
     IQuoteCacheService quoteCacheService)
 {
     _assetPairsCache   = assetPairsCache;
     _quoteCacheService = quoteCacheService;
 }
示例#3
0
 public FakeExchangeConnectorService(
     IQuoteCacheService quoteService,
     IChaosKitty chaosKitty)
 {
     _quoteService = quoteService;
     _chaosKitty   = chaosKitty;
 }
示例#4
0
 public void SetUp()
 {
     RegisterDependencies();
     _quoteCacheService    = Container.Resolve <IQuoteCacheService>();
     _bestPriceConsumer    = Container.Resolve <IEventChannel <BestPriceChangeEventArgs> >();
     _cfdCalculatorService = Container.Resolve <ICfdCalculatorService>();
 }
示例#5
0
 public SnapshotService(
     IScheduleSettingsCacheService scheduleSettingsCacheService,
     IAccountsCacheService accountsCacheService,
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     IOrderReader orderReader,
     IDateService dateService,
     ITradingEngineSnapshotsRepository tradingEngineSnapshotsRepository,
     ISnapshotValidationService snapshotValidationService,
     IQueueValidationService queueValidationService,
     IMarginTradingBlobRepository blobRepository,
     ILog log,
     IFinalSnapshotCalculator finalSnapshotCalculator)
 {
     _scheduleSettingsCacheService = scheduleSettingsCacheService;
     _accountsCacheService         = accountsCacheService;
     _quoteCacheService            = quoteCacheService;
     _fxRateCacheService           = fxRateCacheService;
     _orderReader = orderReader;
     _dateService = dateService;
     _tradingEngineSnapshotsRepository = tradingEngineSnapshotsRepository;
     _snapshotValidationService        = snapshotValidationService;
     _queueValidationService           = queueValidationService;
     _blobRepository          = blobRepository;
     _log                     = log;
     _finalSnapshotCalculator = finalSnapshotCalculator;
 }
示例#6
0
        public void OneTimeSetUp()
        {
            RegisterDependencies();
            _marketMakerId1 = "1";

            _quoteCashService = Container.Resolve <IQuoteCacheService>();
            _matchingEngine   = Container.Resolve <IMarketMakerMatchingEngine>();
        }
示例#7
0
 public PricesController(
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     OrdersCache ordersCache)
 {
     _quoteCacheService  = quoteCacheService;
     _fxRateCacheService = fxRateCacheService;
     _ordersCache        = ordersCache;
 }
示例#8
0
 public PricesController(
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     ISnapshotService snapshotService,
     ILog log,
     IDraftSnapshotKeeper draftSnapshotKeeper)
 {
     _quoteCacheService  = quoteCacheService;
     _fxRateCacheService = fxRateCacheService;
     _snapshotService    = snapshotService;
     _log = log;
     _draftSnapshotKeeper = draftSnapshotKeeper;
 }
示例#9
0
        public TradingEngine(
            IEventChannel <MarginCallEventArgs> marginCallEventChannel,
            IEventChannel <OrderPlacedEventArgs> orderPlacedEventChannel,
            IEventChannel <OrderExecutedEventArgs> orderClosedEventChannel,
            IEventChannel <OrderCancelledEventArgs> orderCancelledEventChannel,
            IEventChannel <OrderChangedEventArgs> orderChangedEventChannel,
            IEventChannel <OrderExecutionStartedEventArgs> orderExecutionStartedEventChannel,
            IEventChannel <OrderActivatedEventArgs> orderActivatedEventChannel,
            IEventChannel <OrderRejectedEventArgs> orderRejectedEventChannel,
            IValidateOrderService validateOrderService,
            IAccountsCacheService accountsCacheService,
            OrdersCache ordersCache,
            IMatchingEngineRouter meRouter,
            IThreadSwitcher threadSwitcher,
            IAssetPairDayOffService assetPairDayOffService,
            ILog log,
            IDateService dateService,
            ICfdCalculatorService cfdCalculatorService,
            IIdentityGenerator identityGenerator,
            IAssetPairsCache assetPairsCache,
            ICqrsSender cqrsSender,
            IEventChannel <StopOutEventArgs> stopOutEventChannel,
            IQuoteCacheService quoteCacheService,
            MarginTradingSettings marginTradingSettings)
        {
            _marginCallEventChannel           = marginCallEventChannel;
            _orderPlacedEventChannel          = orderPlacedEventChannel;
            _orderExecutedEventChannel        = orderClosedEventChannel;
            _orderCancelledEventChannel       = orderCancelledEventChannel;
            _orderActivatedEventChannel       = orderActivatedEventChannel;
            _orderExecutionStartedEvenChannel = orderExecutionStartedEventChannel;
            _orderChangedEventChannel         = orderChangedEventChannel;
            _orderRejectedEventChannel        = orderRejectedEventChannel;

            _validateOrderService   = validateOrderService;
            _accountsCacheService   = accountsCacheService;
            _ordersCache            = ordersCache;
            _meRouter               = meRouter;
            _threadSwitcher         = threadSwitcher;
            _assetPairDayOffService = assetPairDayOffService;
            _log                   = log;
            _dateService           = dateService;
            _cfdCalculatorService  = cfdCalculatorService;
            _identityGenerator     = identityGenerator;
            _assetPairsCache       = assetPairsCache;
            _cqrsSender            = cqrsSender;
            _stopOutEventChannel   = stopOutEventChannel;
            _quoteCacheService     = quoteCacheService;
            _marginTradingSettings = marginTradingSettings;
        }
示例#10
0
        public TradingEngine(
            IEventChannel <MarginCallEventArgs> marginCallEventChannel,
            IEventChannel <StopOutEventArgs> stopoutEventChannel,
            IEventChannel <OrderPlacedEventArgs> orderPlacedEventChannel,
            IEventChannel <OrderClosedEventArgs> orderClosedEventChannel,
            IEventChannel <OrderCancelledEventArgs> orderCancelledEventChannel,
            IEventChannel <OrderLimitsChangedEventArgs> orderLimitsChangesEventChannel,
            IEventChannel <OrderClosingEventArgs> orderClosingEventChannel,
            IEventChannel <OrderActivatedEventArgs> orderActivatedEventChannel,
            IEventChannel <OrderRejectedEventArgs> orderRejectedEventChannel,

            IValidateOrderService validateOrderService,
            IQuoteCacheService quoteCashService,
            IAccountUpdateService accountUpdateService,
            ICommissionService swapCommissionService,
            IEquivalentPricesService equivalentPricesService,
            IAccountsCacheService accountsCacheService,
            OrdersCache ordersCache,
            IAccountAssetsCacheService accountAssetsCacheService,
            IMatchingEngineRouter meRouter,
            IThreadSwitcher threadSwitcher,
            IContextFactory contextFactory,
            IAssetPairDayOffService assetPairDayOffService,
            ILog log)
        {
            _marginCallEventChannel         = marginCallEventChannel;
            _stopoutEventChannel            = stopoutEventChannel;
            _orderPlacedEventChannel        = orderPlacedEventChannel;
            _orderClosedEventChannel        = orderClosedEventChannel;
            _orderCancelledEventChannel     = orderCancelledEventChannel;
            _orderActivatedEventChannel     = orderActivatedEventChannel;
            _orderClosingEventChannel       = orderClosingEventChannel;
            _orderLimitsChangesEventChannel = orderLimitsChangesEventChannel;
            _orderRejectedEventChannel      = orderRejectedEventChannel;

            _quoteCashService          = quoteCashService;
            _accountUpdateService      = accountUpdateService;
            _swapCommissionService     = swapCommissionService;
            _validateOrderService      = validateOrderService;
            _equivalentPricesService   = equivalentPricesService;
            _accountsCacheService      = accountsCacheService;
            _ordersCache               = ordersCache;
            _accountAssetsCacheService = accountAssetsCacheService;
            _meRouter               = meRouter;
            _threadSwitcher         = threadSwitcher;
            _contextFactory         = contextFactory;
            _assetPairDayOffService = assetPairDayOffService;
            _log = log;
        }
示例#11
0
 public EquivalentPricesService(
     IAccountsCacheService accountsCacheService,
     ICfdCalculatorService cfdCalculatorService,
     IQuoteCacheService quoteCacheService,
     IAssetPairsCache assetPairsCache,
     MarginSettings marginSettings,
     ILog log)
 {
     _accountsCacheService = accountsCacheService;
     _cfdCalculatorService = cfdCalculatorService;
     _quoteCacheService    = quoteCacheService;
     _assetPairsCache      = assetPairsCache;
     _marginSettings       = marginSettings;
     _log = log;
 }
示例#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 SnapshotService(
     IScheduleSettingsCacheService scheduleSettingsCacheService,
     IAccountsCacheService accountsCacheService,
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     IOrderReader orderReader,
     IDateService dateService,
     ITradingEngineSnapshotsRepository tradingEngineSnapshotsRepository)
 {
     _scheduleSettingsCacheService = scheduleSettingsCacheService;
     _accountsCacheService         = accountsCacheService;
     _quoteCacheService            = quoteCacheService;
     _fxRateCacheService           = fxRateCacheService;
     _orderReader = orderReader;
     _dateService = dateService;
     _tradingEngineSnapshotsRepository = tradingEngineSnapshotsRepository;
 }
示例#14
0
 public ValidateOrderService(
     IQuoteCacheService quoteCashService,
     IAccountUpdateService accountUpdateService,
     IAccountsCacheService accountsCacheService,
     IAccountAssetsCacheService accountAssetsCacheService,
     IAssetPairsCache assetPairsCache,
     OrdersCache ordersCache,
     IAssetPairDayOffService assetDayOffService)
 {
     _quoteCashService          = quoteCashService;
     _accountUpdateService      = accountUpdateService;
     _accountsCacheService      = accountsCacheService;
     _accountAssetsCacheService = accountAssetsCacheService;
     _assetPairsCache           = assetPairsCache;
     _ordersCache        = ordersCache;
     _assetDayOffService = assetDayOffService;
 }
示例#15
0
 public ManualRfqService(
     ICqrsSender cqrsSender,
     IDateService dateService,
     SpecialLiquidationSettings specialLiquidationSettings,
     CqrsContextNamesSettings cqrsContextNamesSettings,
     IQuoteCacheService quoteCacheService,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     ILog log)
 {
     _cqrsSender  = cqrsSender;
     _dateService = dateService;
     _specialLiquidationSettings       = specialLiquidationSettings;
     _cqrsContextNamesSettings         = cqrsContextNamesSettings;
     _quoteCacheService                = quoteCacheService;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _log = log;
 }
示例#16
0
 public QuotesMonitor(ILog log,
                      IMtSlackNotificationsSender slackNotificationsSender,
                      MarginTradingSettings marginSettings,
                      IQuoteCacheService quoteCacheService,
                      IDateService dateService,
                      IAssetPairDayOffService dayOffService,
                      IAlertSeverityLevelService alertSeverityLevelService)
     : base("QuotesMonitor", 60000, log)
 {
     _log = log;
     _slackNotificationsSender = slackNotificationsSender;
     _marginSettings           = marginSettings;
     _quoteCacheService        = quoteCacheService;
     _dateService               = dateService;
     _dayOffService             = dayOffService;
     _alertSeverityLevelService = alertSeverityLevelService;
     _outdatedQuotes            = new Dictionary <string, OutdatedQuoteInfo>();
 }
示例#17
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;
 }
示例#18
0
 public ProductChangedProjection(
     ITradingEngine tradingEngine,
     IAssetPairsCache assetPairsCache,
     IOrderReader orderReader,
     IScheduleSettingsCacheService scheduleSettingsCacheService,
     ITradingInstrumentsManager tradingInstrumentsManager,
     IRfqService rfqService,
     IRfqPauseService rfqPauseService,
     MarginTradingSettings mtSettings,
     ILog log,
     IQuoteCacheService quoteCache)
 {
     _tradingEngine   = tradingEngine;
     _assetPairsCache = assetPairsCache;
     _orderReader     = orderReader;
     _scheduleSettingsCacheService = scheduleSettingsCacheService;
     _tradingInstrumentsManager    = tradingInstrumentsManager;
     _rfqService      = rfqService;
     _rfqPauseService = rfqPauseService;
     _mtSettings      = mtSettings;
     _log             = log;
     _quoteCache      = quoteCache;
 }
示例#19
0
 public ServiceController(IMaintenanceModeService maintenanceModeService,
                          IQuoteCacheService quoteCacheService)
 {
     _maintenanceModeService = maintenanceModeService;
     _quoteCacheService      = quoteCacheService;
 }