Example #1
0
 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;
 }
Example #2
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;
 }
Example #3
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;
 }
Example #4
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;
 }
Example #5
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;
 }
Example #6
0
 public OrderCacheManager(OrdersCache orderCache,
                          IMarginTradingBlobRepository marginTradingBlobRepository,
                          ILog log) : base(nameof(OrderCacheManager), 5000, log)
 {
     _orderCache = orderCache;
     _marginTradingBlobRepository = marginTradingBlobRepository;
     _log = log;
 }
Example #7
0
 public OrderCacheManager(OrdersCache orderCache,
                          IMarginTradingBlobRepository marginTradingBlobRepository,
                          ILog log, IAccountsCacheService accountsCacheService)
     : base(nameof(OrderCacheManager), 5000, log)
 {
     _orderCache = orderCache;
     _marginTradingBlobRepository = marginTradingBlobRepository;
     _log = log;
     _accountsCacheService = accountsCacheService;
 }
Example #8
0
 public AccountUpdateService(
     IFplService fplService,
     IAccountGroupCacheService accountGroupCacheService,
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     IAssetsCache assetsCache)
 {
     _fplService = fplService;
     _accountGroupCacheService = accountGroupCacheService;
     _accountsCacheService     = accountsCacheService;
     _ordersCache = ordersCache;
     _assetsCache = assetsCache;
 }
Example #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;
        }
Example #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;
        }
Example #11
0
 public AccountUpdateService(
     ICfdCalculatorService cfdCalculatorService,
     IAccountGroupCacheService accountGroupCacheService,
     IAccountAssetsCacheService accountAssetsCacheService,
     IAccountsCacheService accountsCacheService,
     OrdersCache ordersCache,
     IAssetsCache assetsCache)
 {
     _cfdCalculatorService      = cfdCalculatorService;
     _accountGroupCacheService  = accountGroupCacheService;
     _accountAssetsCacheService = accountAssetsCacheService;
     _accountsCacheService      = accountsCacheService;
     _ordersCache = ordersCache;
     _assetsCache = assetsCache;
 }
Example #12
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;
 }