Example #1
0
 public PositionsController(
     IPositionService positionService,
     IHedgeService hedgeService)
 {
     _positionService = positionService;
     _hedgeService    = hedgeService;
 }
 public MarketMakerManager(
     IIndexPriceService indexPriceService,
     IMarketMakerService marketMakerService,
     IHedgeService hedgeService,
     IInternalTradeService internalTradeService,
     IIndexSettingsService indexSettingsService,
     IAssetHedgeSettingsService assetHedgeSettingsService,
     ITokenService tokenService,
     IMarketMakerStateService marketMakerStateService,
     ISettlementService settlementService,
     IQuoteService quoteService,
     ILogFactory logFactory)
 {
     _indexPriceService         = indexPriceService;
     _marketMakerService        = marketMakerService;
     _hedgeService              = hedgeService;
     _internalTradeService      = internalTradeService;
     _indexSettingsService      = indexSettingsService;
     _assetHedgeSettingsService = assetHedgeSettingsService;
     _tokenService              = tokenService;
     _marketMakerStateService   = marketMakerStateService;
     _settlementService         = settlementService;
     _quoteService              = quoteService;
     _log = logFactory.CreateLog(this);
 }
 public HedgeLimitOrdersController(
     IHedgeLimitOrderService hedgeLimitOrderService,
     IHedgeService hedgeService)
 {
     _hedgeLimitOrderService = hedgeLimitOrderService;
     _hedgeService           = hedgeService;
 }
 public HedgingTimer(
     IHedgeService hedgeService,
     ITimersSettingsService timersSettingsService,
     ILogFactory logFactory)
 {
     _hedgeService          = hedgeService;
     _timersSettingsService = timersSettingsService;
     Log = logFactory.CreateLog(this);
 }
        public InternalTradeReaderJob(
            ILogger <InternalTradeReaderJob> logger,
            ISubscriber <IReadOnlyList <WalletTradeMessage> > subscriber,
            IPortfolioManager manager,
            IHedgeService hedgeService,
            ILpWalletManager walletManager,
            IHedgeSettingsManager hedgeSettings)
        {
            _manager       = manager;
            _hedgeService  = hedgeService;
            _walletManager = walletManager;
            _hedgeSettings = hedgeSettings;
            subscriber.Subscribe(HandleTrades);

            _hedgeTimer = new MyTaskTimer(nameof(InternalTradeReaderJob), TimeSpan.FromMilliseconds(5000), logger, DoHedge).DisableTelemetry();
        }
Example #6
0
 public LykkeTradeSubscriber(
     SubscriberSettings settings,
     ISettingsService settingsService,
     IPositionService positionService,
     IDeduplicator deduplicator,
     IHedgeService hedgeService,
     ILogFactory logFactory)
 {
     _settings        = settings;
     _settingsService = settingsService;
     _positionService = positionService;
     _deduplicator    = deduplicator;
     _hedgeService    = hedgeService;
     _logFactory      = logFactory;
     _log             = logFactory.CreateLog(this);
 }
Example #7
0
 public StartupManager(
     LykkeBalancesTimer lykkeBalancesTimer,
     ExternalBalancesTimer externalBalancesTimer,
     MarketMakerTimer marketMakerTimer,
     HedgingTimer hedgingTimer,
     SettlementsTimer settlementsTimer,
     InternalTraderTimer internalTraderTimer,
     PnLStopLossEngineTimer pnLStopLossEngineTimer,
     LykkeTradeSubscriber lykkeTradeSubscriber,
     B2C2QuoteSubscriber b2C2QuoteSubscriber,
     B2C2OrderBooksSubscriber b2C2OrderBooksSubscriber,
     QuoteSubscriber[] quoteSubscribers,
     OrderBooksUpdatesReportSubscriber orderBooksUpdatesReportSubscriber,
     InternalQuotePublisher internalQuotePublisher,
     InternalOrderBookPublisher internalOrderBookPublisher,
     OrderBooksUpdatesReportPublisher orderBooksUpdatesReportPublisher,
     LykkeTradeSubscriberMonitor lykkeTradeSubscriberMonitor,
     StorageMigrationService storageMigrationService,
     ITradeService tradeService,
     IHedgeService hedgeService,
     IMarketMakerService marketMakerService)
 {
     _lykkeBalancesTimer                = lykkeBalancesTimer;
     _externalBalancesTimer             = externalBalancesTimer;
     _marketMakerTimer                  = marketMakerTimer;
     _hedgingTimer                      = hedgingTimer;
     _settlementsTimer                  = settlementsTimer;
     _internalTraderTimer               = internalTraderTimer;
     _pnLStopLossEngineTimer            = pnLStopLossEngineTimer;
     _lykkeTradeSubscriber              = lykkeTradeSubscriber;
     _b2C2QuoteSubscriber               = b2C2QuoteSubscriber;
     _b2C2OrderBooksSubscriber          = b2C2OrderBooksSubscriber;
     _quoteSubscribers                  = quoteSubscribers;
     _orderBooksUpdatesReportSubscriber = orderBooksUpdatesReportSubscriber;
     _internalQuotePublisher            = internalQuotePublisher;
     _internalOrderBookPublisher        = internalOrderBookPublisher;
     _orderBooksUpdatesReportPublisher  = orderBooksUpdatesReportPublisher;
     _lykkeTradeSubscriberMonitor       = lykkeTradeSubscriberMonitor;
     _storageMigrationService           = storageMigrationService;
     _tradeService                      = tradeService;
     _hedgeService                      = hedgeService;
     _marketMakerService                = marketMakerService;
 }