コード例 #1
0
 public ValidateOrderService(
     IQuoteCacheService quoteCashService,
     IAccountUpdateService accountUpdateService,
     IAccountsCacheService accountsCacheService,
     ITradingInstrumentsCacheService accountAssetsCacheService,
     IAssetPairsCache assetPairsCache,
     OrdersCache ordersCache,
     IAssetPairDayOffService assetDayOffService,
     IIdentityGenerator identityGenerator,
     IDateService dateService,
     MarginTradingSettings marginSettings,
     ICfdCalculatorService cfdCalculatorService,
     IFeatureManager featureManager,
     CorrelationContextAccessor correlationContextAccessor)
 {
     _quoteCashService           = quoteCashService;
     _accountUpdateService       = accountUpdateService;
     _accountsCacheService       = accountsCacheService;
     _tradingInstrumentsCache    = accountAssetsCacheService;
     _assetPairsCache            = assetPairsCache;
     _ordersCache                = ordersCache;
     _assetDayOffService         = assetDayOffService;
     _identityGenerator          = identityGenerator;
     _dateService                = dateService;
     _marginSettings             = marginSettings;
     _cfdCalculatorService       = cfdCalculatorService;
     _featureManager             = featureManager;
     _correlationContextAccessor = correlationContextAccessor;
 }
コード例 #2
0
ファイル: AccountUpdateService.cs プロジェクト: alpo-8/MT
 public AccountUpdateService(
     IFplService fplService,
     ITradingConditionsCacheService tradingConditionsCache,
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     IAssetsCache assetsCache,
     IAccountMarginFreezingRepository accountMarginFreezingRepository,
     IAccountMarginUnconfirmedRepository accountMarginUnconfirmedRepository,
     ILog log,
     MarginTradingSettings marginTradingSettings,
     ICfdCalculatorService cfdCalculatorService,
     IQuoteCacheService quoteCacheService)
 {
     _fplService                         = fplService;
     _tradingConditionsCache             = tradingConditionsCache;
     _accountsCacheService               = accountsCacheService;
     _ordersCache                        = ordersCache;
     _assetsCache                        = assetsCache;
     _accountMarginFreezingRepository    = accountMarginFreezingRepository;
     _accountMarginUnconfirmedRepository = accountMarginUnconfirmedRepository;
     _log = log;
     _marginTradingSettings = marginTradingSettings;
     _cfdCalculatorService  = cfdCalculatorService;
     _quoteCacheService     = quoteCacheService;
 }
コード例 #3
0
 public LiquidationCommandsHandler(
     ITradingInstrumentsCacheService tradingInstrumentsCacheService,
     IAccountsCacheService accountsCache,
     IDateService dateService,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     IChaosKitty chaosKitty,
     IMatchingEngineRouter matchingEngineRouter,
     ITradingEngine tradingEngine,
     OrdersCache ordersCache,
     ILog log,
     IAccountUpdateService accountUpdateService,
     IEventChannel <LiquidationEndEventArgs> liquidationEndEventChannel)
 {
     _tradingInstrumentsCacheService = tradingInstrumentsCacheService;
     _accountsCache = accountsCache;
     _dateService   = dateService;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _chaosKitty           = chaosKitty;
     _matchingEngineRouter = matchingEngineRouter;
     _tradingEngine        = tradingEngine;
     _ordersCache          = ordersCache;
     _log = log;
     _accountUpdateService       = accountUpdateService;
     _liquidationEndEventChannel = liquidationEndEventChannel;
 }
コード例 #4
0
 public LiquidationCommandsHandler(
     IAccountsCacheService accountsCache,
     IDateService dateService,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     IChaosKitty chaosKitty,
     ITradingEngine tradingEngine,
     OrdersCache ordersCache,
     ILog log,
     IAccountUpdateService accountUpdateService,
     IEventChannel <LiquidationEndEventArgs> liquidationEndEventChannel,
     LiquidationHelper liquidationHelper,
     ILiquidationFailureExecutor failureExecutor)
 {
     _accountsCache = accountsCache;
     _dateService   = dateService;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _chaosKitty                 = chaosKitty;
     _tradingEngine              = tradingEngine;
     _ordersCache                = ordersCache;
     _log                        = log;
     _accountUpdateService       = accountUpdateService;
     _liquidationEndEventChannel = liquidationEndEventChannel;
     _liquidationHelper          = liquidationHelper;
     _failureExecutor            = failureExecutor;
 }
コード例 #5
0
ファイル: SnapshotService.cs プロジェクト: LykkeBusiness/MT
 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 SetUp()
 {
     RegisterDependencies();
     _bestPriceConsumer    = Container.Resolve <IEventChannel <BestPriceChangeEventArgs> >();
     _accountsCacheService = Container.Resolve <IAccountsCacheService>();
     _ordersCache          = Container.Resolve <OrdersCache>();
 }
コード例 #7
0
 public SpecialLiquidationCommandsHandler(
     ITradingEngine tradingEngine,
     IDateService dateService,
     IOrderReader orderReader,
     IChaosKitty chaosKitty,
     IOperationExecutionInfoRepository operationExecutionInfoRepository,
     ILog log,
     MarginTradingSettings marginTradingSettings,
     IAssetPairsCache assetPairsCache,
     IAssetPairDayOffService assetPairDayOffService,
     IExchangeConnectorService exchangeConnectorService,
     IIdentityGenerator identityGenerator,
     IAccountsCacheService accountsCacheService)
 {
     _tradingEngine = tradingEngine;
     _dateService   = dateService;
     _orderReader   = orderReader;
     _chaosKitty    = chaosKitty;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
     _log = log;
     _marginTradingSettings    = marginTradingSettings;
     _assetPairsCache          = assetPairsCache;
     _assetPairDayOffService   = assetPairDayOffService;
     _exchangeConnectorService = exchangeConnectorService;
     _identityGenerator        = identityGenerator;
     _accountsCacheService     = accountsCacheService;
 }
コード例 #8
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,
     IIdentityGenerator identityGenerator)
 {
     _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;
     _identityGenerator  = identityGenerator;
 }
コード例 #9
0
 public ValidateOrderService(
     IQuoteCacheService quoteCashService,
     IAccountUpdateService accountUpdateService,
     IAccountsCacheService accountsCacheService,
     ITradingInstrumentsCacheService accountAssetsCacheService,
     IAssetPairsCache assetPairsCache,
     OrdersCache ordersCache,
     IAssetPairDayOffService assetDayOffService,
     IIdentityGenerator identityGenerator,
     IDateService dateService,
     MarginTradingSettings marginSettings,
     ICfdCalculatorService cfdCalculatorService)
 {
     _quoteCashService        = quoteCashService;
     _accountUpdateService    = accountUpdateService;
     _accountsCacheService    = accountsCacheService;
     _tradingInstrumentsCache = accountAssetsCacheService;
     _assetPairsCache         = assetPairsCache;
     _ordersCache             = ordersCache;
     _assetDayOffService      = assetDayOffService;
     _identityGenerator       = identityGenerator;
     _dateService             = dateService;
     _marginSettings          = marginSettings;
     _cfdCalculatorService    = cfdCalculatorService;
 }
コード例 #10
0
 public OvernightSwapService(
     IOvernightSwapCache overnightSwapCache,
     IAccountAssetsCacheService accountAssetsCacheService,
     IAccountsCacheService accountsCacheService,
     ICommissionService commissionService,
     IOvernightSwapStateRepository overnightSwapStateRepository,
     IOvernightSwapHistoryRepository overnightSwapHistoryRepository,
     IOrderReader orderReader,
     IThreadSwitcher threadSwitcher,
     IDateService dateService,
     AccountManager accountManager,
     MarginSettings marginSettings,
     ILog log)
 {
     _overnightSwapCache             = overnightSwapCache;
     _accountAssetsCacheService      = accountAssetsCacheService;
     _accountsCacheService           = accountsCacheService;
     _commissionService              = commissionService;
     _overnightSwapStateRepository   = overnightSwapStateRepository;
     _overnightSwapHistoryRepository = overnightSwapHistoryRepository;
     _orderReader    = orderReader;
     _threadSwitcher = threadSwitcher;
     _dateService    = dateService;
     _accountManager = accountManager;
     _marginSettings = marginSettings;
     _log            = log;
 }
コード例 #11
0
        public OvernightSwapNotificationService(
            IOvernightSwapCache overnightSwapCache,
            IAssetPairsCache assetPairsCache,
            IAccountsCacheService accountsCacheService,
            IEmailService emailService,
            IClientAccountService clientAccountService,
            IDateService dateService,

            IOvernightSwapHistoryRepository overnightSwapHistoryRepository,

            IThreadSwitcher threadSwitcher,

            ILog log)
        {
            _overnightSwapCache   = overnightSwapCache;
            _assetPairsCache      = assetPairsCache;
            _accountsCacheService = accountsCacheService;
            _emailService         = emailService;
            _clientAccountService = clientAccountService;
            _dateService          = dateService;

            _overnightSwapHistoryRepository = overnightSwapHistoryRepository;

            _threadSwitcher = threadSwitcher;

            _log = log;
        }
コード例 #12
0
ファイル: PositionsConsumer.cs プロジェクト: LykkeBusiness/MT
 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;
 }
コード例 #13
0
 public MarginTradingEnabledCacheService(ICacheProvider cacheProvider,
                                         IClientAccountService clientAccountService, IAccountsCacheService accountsCacheService)
 {
     _cacheProvider        = cacheProvider;
     _clientAccountService = clientAccountService;
     _accountsCacheService = accountsCacheService;
 }
コード例 #14
0
 public AccountsController(IAccountsCacheService accountsCacheService,
                           IOrderReader orderReader,
                           ICqrsSender cqrsSender)
 {
     _accountsCacheService = accountsCacheService;
     _orderReader          = orderReader;
     _cqrsSender           = cqrsSender;
 }
コード例 #15
0
 public UpdatedAccountsStatsConsumer(IAccountsCacheService accountsCacheService,
                                     MarginSettings marginSettings,
                                     IRabbitMqNotifyService rabbitMqNotifyService)
 {
     _accountsCacheService  = accountsCacheService;
     _marginSettings        = marginSettings;
     _rabbitMqNotifyService = rabbitMqNotifyService;
 }
コード例 #16
0
ファイル: RisksController.cs プロジェクト: wildbunny/MT
 public RisksController(IAssetPairsCache instrumentsCache,
                        IAccountsCacheService accountsCacheService,
                        MarginSettings marginSettings,
                        IMarginTradingAccountHistoryRepository accountHistoryRepository)
 {
     _instrumentsCache         = instrumentsCache;
     _accountsCacheService     = accountsCacheService;
     _marginSettings           = marginSettings;
     _accountHistoryRepository = accountHistoryRepository;
 }
コード例 #17
0
 public OrderCacheManager(OrdersCache orderCache,
                          IMarginTradingBlobRepository marginTradingBlobRepository,
                          ILog log, IAccountsCacheService accountsCacheService)
     : base(nameof(OrderCacheManager), 5000, log)
 {
     _orderCache = orderCache;
     _marginTradingBlobRepository = marginTradingBlobRepository;
     _log = log;
     _accountsCacheService = accountsCacheService;
 }
コード例 #18
0
 public EquivalentPricesService(
     IAccountsCacheService accountsCacheService,
     ICfdCalculatorService cfdCalculatorService,
     MarginSettings marginSettings,
     ILog log)
 {
     _accountsCacheService = accountsCacheService;
     _cfdCalculatorService = cfdCalculatorService;
     _marginSettings       = marginSettings;
     _log = log;
 }
コード例 #19
0
 public ReportService(
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     IOpenPositionsRepository openPositionsRepository,
     IAccountStatRepository accountStatRepository)
 {
     _accountsCacheService    = accountsCacheService;
     _ordersCache             = ordersCache;
     _openPositionsRepository = openPositionsRepository;
     _accountStatRepository   = accountStatRepository;
 }
コード例 #20
0
        public void OneTimeSetUp()
        {
            RegisterDependencies();
            _accountsCacheService = Container.Resolve<IAccountsCacheService>();
            _accountUpdateService = Container.Resolve<IAccountUpdateService>();
            _ordersCache = Container.Resolve<OrdersCache>();
            var bestPriceConsumer = Container.Resolve<IEventChannel<BestPriceChangeEventArgs>>();

            bestPriceConsumer.SendEvent(this, new BestPriceChangeEventArgs(new InstrumentBidAskPair { Instrument = "EURUSD", Bid = 1.02M, Ask = 1.04M }));
            bestPriceConsumer.SendEvent(this, new BestPriceChangeEventArgs(new InstrumentBidAskPair { Instrument = "BTCUSD", Bid = 905.1M, Ask = 905.35M }));
        }
コード例 #21
0
 public FplService(
     ICfdCalculatorService cfdCalculatorService,
     IAssetPairsCache assetPairsCache,
     IAccountsCacheService accountsCacheService,
     ITradingInstrumentsCacheService tradingInstrumentsCache,
     MarginTradingSettings marginTradingSettings)
 {
     _cfdCalculatorService    = cfdCalculatorService;
     _accountsCacheService    = accountsCacheService;
     _tradingInstrumentsCache = tradingInstrumentsCache;
     _marginTradingSettings   = marginTradingSettings;
 }
コード例 #22
0
 public AccountsManagementController(IAccountsCacheService accountsCacheService,
                                     IDateService dateService,
                                     AccountManager accountManager,
                                     AccountGroupCacheService accountGroupCacheService,
                                     ITradingConditionsCacheService tradingConditionsCacheService)
 {
     _accountsCacheService          = accountsCacheService;
     _dateService                   = dateService;
     _accountManager                = accountManager;
     _accountGroupCacheService      = accountGroupCacheService;
     _tradingConditionsCacheService = tradingConditionsCacheService;
 }
コード例 #23
0
ファイル: ClientNotifyService.cs プロジェクト: wildbunny/MT
 public ClientNotifyService(
     IRabbitMqNotifyService rabbitMqNotifyService,
     IMarginTradingOperationsLogService operationsLogService,
     MarginSettings marginSettings,
     IConsole consoleWriter,
     IAccountsCacheService accountsCacheService)
 {
     _rabbitMqNotifyService = rabbitMqNotifyService;
     _operationsLogService  = operationsLogService;
     _marginSettings        = marginSettings;
     _consoleWriter         = consoleWriter;
     _accountsCacheService  = accountsCacheService;
 }
コード例 #24
0
 public WithdrawalCommandsHandler(
     IDateService dateService,
     IAccountsCacheService accountsCacheService,
     IAccountUpdateService accountUpdateService,
     IChaosKitty chaosKitty,
     IOperationExecutionInfoRepository operationExecutionInfoRepository)
 {
     _dateService                      = dateService;
     _accountsCacheService             = accountsCacheService;
     _accountUpdateService             = accountUpdateService;
     _chaosKitty                       = chaosKitty;
     _operationExecutionInfoRepository = operationExecutionInfoRepository;
 }
コード例 #25
0
 public AccountProfileController(
     IMarginTradingAccountHistoryRepository accountsHistoryRepository,
     IMarginTradingOrdersHistoryRepository ordersHistoryRepository,
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     MarginSettings settings)
 {
     _accountsHistoryRepository = accountsHistoryRepository;
     _ordersHistoryRepository   = ordersHistoryRepository;
     _accountsCacheService      = accountsCacheService;
     _ordersCache = ordersCache;
     _settings    = settings;
 }
コード例 #26
0
 public FplService(
     ICfdCalculatorService cfdCalculatorService,
     IAssetPairsCache assetPairsCache,
     IAccountsCacheService accountsCacheService,
     IAccountAssetsCacheService accountAssetsCacheService,
     IAssetsCache assetsCache)
 {
     _cfdCalculatorService      = cfdCalculatorService;
     _assetPairsCache           = assetPairsCache;
     _accountsCacheService      = accountsCacheService;
     _accountAssetsCacheService = accountAssetsCacheService;
     _assetsCache = assetsCache;
 }
コード例 #27
0
 public AccountUpdateService(
     IFplService fplService,
     IAccountGroupCacheService accountGroupCacheService,
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     IAssetsCache assetsCache)
 {
     _fplService = fplService;
     _accountGroupCacheService = accountGroupCacheService;
     _accountsCacheService     = accountsCacheService;
     _ordersCache = ordersCache;
     _assetsCache = assetsCache;
 }
コード例 #28
0
 public AccountsBalanceController(
     MarginSettings marginSettings,
     IMarginTradingOperationsLogService operationsLogService,
     ILog log,
     IAccountsCacheService accountsCacheService,
     AccountManager accountManager)
 {
     _marginSettings       = marginSettings;
     _operationsLogService = operationsLogService;
     _log = log;
     _accountsCacheService = accountsCacheService;
     _accountManager       = accountManager;
 }
コード例 #29
0
ファイル: TradingEngine.cs プロジェクト: alpo-8/MT
        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;
        }
コード例 #30
0
ファイル: AccountsController.cs プロジェクト: alpo-8/MT
 public AccountsController(IAccountsCacheService accountsCacheService,
                           IDateService dateService,
                           AccountManager accountManager,
                           IOrderReader orderReader,
                           TradingConditionsCacheService tradingConditionsCache,
                           ICqrsSender cqrsSender)
 {
     _accountsCacheService   = accountsCacheService;
     _dateService            = dateService;
     _accountManager         = accountManager;
     _orderReader            = orderReader;
     _tradingConditionsCache = tradingConditionsCache;
     _cqrsSender             = cqrsSender;
 }