示例#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,
     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;
 }
示例#2
0
 public MarketMakerService(IMarketMakerMatchingEngine matchingEngine,
                           IAssetPairDayOffService assetPairDayOffService,
                           IMaintenanceModeService maintenanceModeService)
 {
     _matchingEngine         = matchingEngine;
     _assetPairDayOffService = assetPairDayOffService;
     _maintenanceModeService = maintenanceModeService;
 }
示例#3
0
        public void OneTimeSetUp()
        {
            RegisterDependencies();
            _marketMakerId1 = "1";

            _quoteCashService = Container.Resolve <IQuoteCacheService>();
            _matchingEngine   = Container.Resolve <IMarketMakerMatchingEngine>();
        }
示例#4
0
 public IsAliveController(
     IMarketMakerMatchingEngine matchingEngine,
     ITradingEngine tradingEngine,
     MarginSettings settings,
     IDateService dateService)
 {
     _matchingEngine = matchingEngine;
     _tradingEngine  = tradingEngine;
     _settings       = settings;
     _dateService    = dateService;
 }
示例#5
0
        public MatchingEngineInMemoryRepository(
            IMarketMakerMatchingEngine marketMakerMatchingEngine,
            IStpMatchingEngine stpMatchingEngine)
        {
            var mes = new IMatchingEngineBase[]
            {
                new RejectMatchingEngine(),
                marketMakerMatchingEngine,
                stpMatchingEngine
            };

            _matchingEngines = mes.ToDictionary(me => me.Id);
        }
示例#6
0
        public static void SetOrders(this IMarketMakerMatchingEngine matchingEngine, string marketMakerId, LimitOrder[] ordersToAdd = null, string[] orderIdsToDelete = null, bool deleteAll = false)
        {
            var model = new SetOrderModel
            {
                MarketMakerId    = marketMakerId,
                OrdersToAdd      = ordersToAdd,
                OrderIdsToDelete = orderIdsToDelete
            };

            if (deleteAll)
            {
                model.DeleteAllBuy  = true;
                model.DeleteAllSell = true;
            }
            matchingEngine.SetOrders(model);
        }
示例#7
0
 public void OneTimeSetUp()
 {
     RegisterDependencies();
     _quoteCashService = Container.Resolve <IQuoteCacheService>() as IEventConsumer <BestPriceChangeEventArgs>;
     _matchingEngine   = Container.Resolve <IMarketMakerMatchingEngine>();
 }