protected BitcoinCoreAccountServiceRaw(Exchange exchange) { super(exchange); ExchangeSpecification specification = exchange.getExchangeSpecification(); ClientConfig config = getClientConfig(); String user = specification.getUserName(); ClientConfigUtil.addBasicAuthCredentials( config, user == null ? "" : user, specification.getPassword()); bitcoinCore = RestProxyFactory.createProxy(BitcoinCore.class, specification.getPlainTextUri(), config); }
protected CoinfloorAuthenticatedService(Exchange exchange) { super(exchange); ExchangeSpecification specification = exchange.getExchangeSpecification(); if (specification.getUserName() == null || specification.getPassword() == null) { logger.info( "Authenticated endpoints are not available - username and password have not been configured"); coinfloor = null; return; } ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials( config, specification.getUserName(), specification.getPassword()); coinfloor = RestProxyFactory.createProxy( CoinfloorAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }
protected HitbtcBaseService(Exchange exchange) { super(exchange); String apiKey = exchange.getExchangeSpecification().getApiKey(); String secretKey = exchange.getExchangeSpecification().getSecretKey(); ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials(config, apiKey, secretKey); hitbtc = RestProxyFactory.createProxy( HitbtcAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }
protected HitbtcBaseService(Exchange exchange) { super(exchange); String apiKey = exchange.getExchangeSpecification().getApiKey(); String secretKey = exchange.getExchangeSpecification().getSecretKey(); ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials(config, apiKey, secretKey); hitbtc = RestProxyFactory.createProxy( HitbtcAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }