Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 public LightweightExternalOrderbookService(
     IEventChannel <BestPriceChangeEventArgs> bestPriceChangeEventChannel,
     IOrderBookProviderApi orderBookProviderApi,
     IDateService dateService,
     IConvertService convertService,
     IScheduleSettingsCacheService scheduleSettingsCache,
     IAssetPairDayOffService assetPairDayOffService,
     IAssetPairsCache assetPairsCache,
     ICqrsSender cqrsSender,
     IIdentityGenerator identityGenerator,
     ILog log,
     MarginTradingSettings marginTradingSettings)
 {
     _bestPriceChangeEventChannel = bestPriceChangeEventChannel;
     _orderBookProviderApi        = orderBookProviderApi;
     _dateService            = dateService;
     _convertService         = convertService;
     _scheduleSettingsCache  = scheduleSettingsCache;
     _assetPairDayOffService = assetPairDayOffService;
     _assetPairsCache        = assetPairsCache;
     _cqrsSender             = cqrsSender;
     _identityGenerator      = identityGenerator;
     _log = log;
     _defaultExternalExchangeId = string.IsNullOrEmpty(marginTradingSettings.DefaultExternalExchangeId)
         ? "Default"
         : marginTradingSettings.DefaultExternalExchangeId;
     _orderbookValidation = marginTradingSettings.OrderbookValidation;
 }
Ejemplo n.º 3
0
 public ExternalOrderbookService(
     IEventChannel <BestPriceChangeEventArgs> bestPriceChangeEventChannel,
     IOrderBookProviderApi orderBookProviderApi,
     IDateService dateService,
     IConvertService convertService,
     IAssetPairDayOffService assetPairDayOffService,
     IScheduleSettingsCacheService scheduleSettingsCache,
     IAssetPairsCache assetPairsCache,
     ICqrsSender cqrsSender,
     IIdentityGenerator identityGenerator,
     ILog log,
     MarginTradingSettings marginTradingSettings)
 {
     _bestPriceChangeEventChannel = bestPriceChangeEventChannel;
     _orderBookProviderApi        = orderBookProviderApi;
     _dateService            = dateService;
     _convertService         = convertService;
     _assetPairDayOffService = assetPairDayOffService;
     _scheduleSettingsCache  = scheduleSettingsCache;
     _assetPairsCache        = assetPairsCache;
     _cqrsSender             = cqrsSender;
     _identityGenerator      = identityGenerator;
     _log = log;
     _marginTradingSettings = marginTradingSettings;
 }
Ejemplo n.º 4
0
 public AccountsController(IAccountsCacheService accountsCacheService,
                           IOrderReader orderReader,
                           ICqrsSender cqrsSender)
 {
     _accountsCacheService = accountsCacheService;
     _orderReader          = orderReader;
     _cqrsSender           = cqrsSender;
 }
Ejemplo n.º 5
0
 public RfqPauseService(IOperationExecutionPauseRepository pauseRepository,
                        IOperationExecutionInfoRepository executionInfoRepository,
                        ILog log,
                        IDateService dateService,
                        ICqrsSender cqrsSender)
 {
     _pauseRepository         = pauseRepository;
     _executionInfoRepository = executionInfoRepository;
     _log         = log;
     _dateService = dateService;
     _cqrsSender  = cqrsSender;
 }
Ejemplo n.º 6
0
 public LiquidationHelper(IMatchingEngineRouter matchingEngineRouter,
                          IDateService dateService,
                          ICqrsSender cqrsSender,
                          OrdersCache ordersCache,
                          IAssetPairDayOffService assetPairDayOffService)
 {
     _matchingEngineRouter   = matchingEngineRouter;
     _dateService            = dateService;
     _cqrsSender             = cqrsSender;
     _ordersCache            = ordersCache;
     _assetPairDayOffService = assetPairDayOffService;
 }
Ejemplo n.º 7
0
 public SpecialLiquidationService(
     ICqrsSender cqrsSender,
     IDateService dateService,
     IThreadSwitcher threadSwitcher,
     SpecialLiquidationSettings specialLiquidationSettings,
     CqrsContextNamesSettings cqrsContextNamesSettings)
 {
     _cqrsSender                 = cqrsSender;
     _dateService                = dateService;
     _threadSwitcher             = threadSwitcher;
     _specialLiquidationSettings = specialLiquidationSettings;
     _cqrsContextNamesSettings   = cqrsContextNamesSettings;
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 10
0
 public FakeExchangeConnectorClient(
     IExternalOrderbookService orderbookService,
     IChaosKitty chaosKitty,
     MarginTradingSettings settings,
     ILog log,
     IDateService dateService,
     ICqrsSender cqrsSender)
 {
     _chaosKitty       = chaosKitty;
     _settings         = settings;
     _log              = log;
     _dateService      = dateService;
     _cqrsSender       = cqrsSender;
     _orderbookService = orderbookService;
 }
Ejemplo n.º 11
0
 public ScheduleSettingsCacheService(
     ICqrsSender cqrsSender,
     IScheduleSettingsApi scheduleSettingsApi,
     IAssetPairsCache assetPairsCache,
     IDateService dateService,
     ILog log,
     OvernightMarginSettings overnightMarginSettings)
 {
     _cqrsSender          = cqrsSender;
     _scheduleSettingsApi = scheduleSettingsApi;
     _assetPairsCache     = assetPairsCache;
     _dateService         = dateService;
     _log = log;
     _overnightMarginSettings = overnightMarginSettings;
 }
Ejemplo n.º 12
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;
 }
Ejemplo n.º 13
0
 public PositionsController(
     ITradingEngine tradingEngine,
     IOperationsLogService operationsLogService,
     ILog log,
     OrdersCache ordersCache,
     IAssetPairDayOffService assetDayOffService,
     IIdentityGenerator identityGenerator,
     ICqrsSender cqrsSender,
     IDateService dateService)
 {
     _tradingEngine        = tradingEngine;
     _operationsLogService = operationsLogService;
     _log                = log;
     _ordersCache        = ordersCache;
     _assetDayOffService = assetDayOffService;
     _identityGenerator  = identityGenerator;
     _cqrsSender         = cqrsSender;
     _dateService        = dateService;
 }
Ejemplo n.º 14
0
 public OrdersController(
     ITradingEngine tradingEngine,
     IOperationsLogService operationsLogService,
     ILog log,
     OrdersCache ordersCache,
     IDateService dateService,
     IValidateOrderService validateOrderService,
     IIdentityGenerator identityGenerator,
     ICqrsSender cqrsSender)
 {
     _tradingEngine        = tradingEngine;
     _operationsLogService = operationsLogService;
     _log                  = log;
     _ordersCache          = ordersCache;
     _dateService          = dateService;
     _validateOrderService = validateOrderService;
     _identityGenerator    = identityGenerator;
     _cqrsSender           = cqrsSender;
 }
 public AccountsController(
     IAccountManagementService accountManagementService,
     IAccuracyService accuracyService,
     IConvertService convertService,
     ISystemClock systemClock,
     ISendBalanceCommandsService sendBalanceCommandsService,
     ICqrsSender cqrsSender,
     IScheduleSettingsApi scheduleSettingsApi,
     IBrokerSettingsApi brokerSettingsApi,
     BrokerConfigurationAccessor brokerConfigurationAccessor,
     ILog logger)
 {
     _accountManagementService = accountManagementService;
     _accuracyService          = accuracyService;
     _convertService           = convertService;
     _systemClock = systemClock;
     _sendBalanceCommandsService = sendBalanceCommandsService;
     _cqrsSender                  = cqrsSender;
     _scheduleSettingsApi         = scheduleSettingsApi;
     _brokerSettingsApi           = brokerSettingsApi;
     _brokerConfigurationAccessor = brokerConfigurationAccessor;
     _logger = logger;
 }
Ejemplo n.º 16
0
 public PositionsController(
     ITradingEngine tradingEngine,
     IOperationsLogService operationsLogService,
     ILog log,
     OrdersCache ordersCache,
     IAssetPairDayOffService assetDayOffService,
     IIdentityGenerator identityGenerator,
     ICqrsSender cqrsSender,
     IDateService dateService,
     IAccountHistoryRepository accountHistoryRepository,
     IMarginTradingBlobRepository blobRepository)
 {
     _tradingEngine        = tradingEngine;
     _operationsLogService = operationsLogService;
     _log                      = log;
     _ordersCache              = ordersCache;
     _assetDayOffService       = assetDayOffService;
     _identityGenerator        = identityGenerator;
     _cqrsSender               = cqrsSender;
     _dateService              = dateService;
     _accountHistoryRepository = accountHistoryRepository;
     _blobRepository           = blobRepository;
 }
Ejemplo n.º 17
0
 public OrdersController(IAssetPairsCache assetPairsCache,
                         ITradingEngine tradingEngine,
                         IAccountsCacheService accountsCacheService,
                         IOperationsLogService operationsLogService,
                         ILog log,
                         OrdersCache ordersCache,
                         IAssetPairDayOffService assetDayOffService,
                         IDateService dateService,
                         IValidateOrderService validateOrderService,
                         IIdentityGenerator identityGenerator,
                         ICqrsSender cqrsSender)
 {
     _assetPairsCache      = assetPairsCache;
     _tradingEngine        = tradingEngine;
     _accountsCacheService = accountsCacheService;
     _operationsLogService = operationsLogService;
     _log                  = log;
     _ordersCache          = ordersCache;
     _assetDayOffService   = assetDayOffService;
     _dateService          = dateService;
     _validateOrderService = validateOrderService;
     _identityGenerator    = identityGenerator;
     _cqrsSender           = cqrsSender;
 }