private async Task <string[]> GetPairsToSubscribe() { var supported = _settings.SupportedCurrencySymbols.Select(x => x.ExchangeSymbol.ToUpper()).ToArray(); if (_settings.UseSupportedCurrencySymbolsAsFilter) { return(supported); } else { var bitfinexServiceClientCredentials = new BitfinexServiceClientCredentials( string.Empty, string.Empty); // bitfinex does not require key/secret for public events var api = new BitfinexApi(bitfinexServiceClientCredentials, _log) { BaseUri = new Uri(_settings.EndpointUrl) }; return((await api.GetAllSymbolsAsync()) .Select(x => x.ToUpper()) .Concat(supported).ToArray()); } }
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) }; }
public BitfinexApiClientTests() { var cred = new BitfinexServiceClientCredentials("Your API key", "Your secret"); _api = new BitfinexApi(cred); }