public BaseApiController(
     BitfinexAdapterSettings configuration,
     ILimitOrderRepository limitOrderRepository,
     ILog log)
 {
     _configuration        = configuration;
     _limitOrderRepository = limitOrderRepository;
     _log = log;
 }
示例#2
0
 public BitfinexWebSocketSubscriber(BitfinexAdapterSettings configuration,
                                    bool authenticate,
                                    ILog log,
                                    string ApiKey,
                                    string ApiSecret,
                                    TimeSpan?heartbeatPeriod = null) : base(new WebSocketTextMessenger(configuration.WebSocketEndpointUrl, log), log, heartbeatPeriod)
 {
     _configuration = configuration;
     _authenticate  = authenticate;
     _log           = log;
     _pingTimer     = new Timer(SendPing);
     _apiKey        = ApiKey;
     _apiSecret     = ApiSecret;
 }
        protected ExchangeBase(string name, BitfinexAdapterSettings config, ILog log)
        {
            Name     = name;
            Config   = config;
            State    = ExchangeState.Initializing;
            LykkeLog = log;

            Instruments = config.SupportedCurrencySymbols?.Select(x => new Instrument(x.LykkeSymbol)).ToList() ?? new List <Instrument>();

            if (!Instruments.Any() && config.UseSupportedCurrencySymbolsAsFilter != false)
            {
                throw new ArgumentException($"There is no instruments in the settings for {Name} exchange");
            }
        }
示例#4
0
        public BitfinexExchange(
            BitfinexAdapterSettings configuration,
            ILimitOrderRepository snapshotStorage,
            string xApiKey,
            string apiKey,
            string secret,
            ILog log)
            : base(Constants.BitfinexExchangeName, configuration, log)
        {
            _modelConverter = new BitfinexModelConverter(configuration);
            var credenitals = new BitfinexServiceClientCredentials(apiKey, secret);

            _snapshotStorage = snapshotStorage;

            _xApiKey = xApiKey;

            _exchangeApi = new BitfinexApi(credenitals, log)
            {
                BaseUri = new Uri(configuration.EndpointUrl)
            };
        }
示例#5
0
 public OrderBooksPublishingService(ILog log, BitfinexAdapterSettings settings)
 {
     _log      = log;
     _settings = settings;
 }
示例#6
0
 public SpotController(BitfinexAdapterSettings configuration, ILimitOrderRepository lor, ILog log)
     : base(configuration, lor, log)
 {
 }
 public BitfinexModelConverter(BitfinexAdapterSettings configuration) : base(configuration.SupportedCurrencySymbols, configuration.UseSupportedCurrencySymbolsAsFilter)
 {
 }
 public ExchangeController(BitfinexAdapterSettings settings, ILimitOrderRepository lor, ILog log)
     : base(settings, lor, log)
 {
 }