public BitfinexOrderBooksHarvester(BitfinexExchangeConfiguration configuration,
                                           IHandler <OrderBook> orderBookHandler,
                                           IHandler <TickPrice> tickPriceHandler,
                                           ILog log)
            : base(BitfinexExchange.Name, configuration, new WebSocketTextMessenger(configuration.WebSocketEndpointUrl, log), log, orderBookHandler)
        {
            _configuration    = configuration;
            _channels         = new Dictionary <long, Channel>();
            _tickPriceHandler = tickPriceHandler;
            var credenitals = new BitfinexServiceClientCredentials(configuration.ApiKey, configuration.ApiSecret);

            _exchangeApi = new BitfinexApi(credenitals)
            {
                BaseUri = new Uri(configuration.EndpointUrl)
            };
        }
コード例 #2
0
        public BitfinexExchange(BitfinexExchangeConfiguration configuration,
                                TranslatedSignalsRepository translatedSignalsRepository,
                                BitfinexOrderBooksHarvester orderBooksHarvester,
                                BitfinexExecutionHarvester executionHarvester, ILog log)
            : base(Name, configuration, translatedSignalsRepository, log)
        {
            _modelConverter      = new BitfinexModelConverter(configuration);
            _orderBooksHarvester = orderBooksHarvester;
            _executionHarvester  = executionHarvester;
            var credenitals = new BitfinexServiceClientCredentials(configuration.ApiKey, configuration.ApiSecret);

            _exchangeApi = new BitfinexApi(credenitals)
            {
                BaseUri = new Uri(configuration.EndpointUrl)
            };



            orderBooksHarvester.MaxOrderBookRate = configuration.MaxOrderBookRate;
        }