Пример #1
0
 public void Setup()
 {
     RegisterDependencies();
     _validateOrderService = Container.Resolve <IValidateOrderService>();
     _bestPriceConsumer    = Container.Resolve <IEventChannel <BestPriceChangeEventArgs> >();
     _ordersCache          = Container.Resolve <OrdersCache>();
 }
Пример #2
0
 public void Setup()
 {
     RegisterDependencies();
     _validateOrderService = Container.Resolve <IValidateOrderService>();
     _bestPriceConsumer    = Container.Resolve <IEventChannel <BestPriceChangeEventArgs> >();
     _ordersCache          = Container.Resolve <OrdersCache>();
     _assetPairsCache      = Container.Resolve <IAssetPairsCache>();
     _me = new FakeMatchingEngine(1);
 }
Пример #3
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;
        }
Пример #4
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;
        }
Пример #5
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;
 }
Пример #6
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;
 }
Пример #7
0
 public OrderController(ILogger <OrderController> logger, IValidateOrderService validate)
 {
     _logger   = logger;
     _validate = validate;
 }