/** * Constructor * * @param exchange */ public OERMarketDataServiceRaw(Exchange exchange) { super(exchange); this.openExchangeRates = RestProxyFactory.createProxy( OER.class, exchange.getExchangeSpecification().getPlainTextUri(), getClientConfig()); }
/** * Constructor * * @param exchange */ public BitcoinChartsMarketDataService(Exchange exchange) { super(exchange); this.bitcoinCharts = RestProxyFactory.createProxy( BitcoinCharts.class, exchange.getExchangeSpecification().getPlainTextUri(), getClientConfig()); }
protected TrueFxMarketDataServiceRaw(Exchange exchange) { super(exchange); final ClientConfig config = getClientConfig(); config.setJacksonObjectMapperFactory(factory); trueFx = RestProxyFactory.createProxy( TrueFxPublic.class, exchange.getExchangeSpecification().getPlainTextUri(), config); }
public RippleBaseService(final Exchange exchange) { super(exchange); final String uri; if (exchange.getExchangeSpecification().getSslUri() != null && exchange.getExchangeSpecification().getSslUri().length() > 0) { // by default use an SSL encrypted connection if it is configured uri = exchange.getExchangeSpecification().getSslUri(); } else if (exchange.getExchangeSpecification().getPlainTextUri() != null && exchange.getExchangeSpecification().getPlainTextUri().length() > 0) { // otherwise try a plain text connection uri = exchange.getExchangeSpecification().getPlainTextUri(); } else { throw new IllegalStateException("either SSL or plain text URI must be specified"); } ripplePublic = RestProxyFactory.createProxy(RipplePublic.class, uri, getClientConfig()); rippleAuthenticated = RestProxyFactory.createProxy(RippleAuthenticated.class, uri, getClientConfig()); } }
public static void main(String[] args) throws IOException { Exchange blockchainExchangexchange = ExchangeFactory.INSTANCE.createExchange(BlockchainExchange.class.getName()); Blockchain blockchain = RestProxyFactory.createProxy( Blockchain.class, blockchainExchangexchange.getExchangeSpecification().getPlainTextUri()); BitcoinAddress bitcoinAddress = blockchain.getBitcoinAddress("XXX"); System.out.println(bitcoinAddress.toString()); BitcoinAddresses bitcoinAddresses = blockchain.getBitcoinAddresses("XXX"); for (BitcoinAddress bitcoinAddress2 : bitcoinAddresses.getBitcoinAddresses()) { System.out.println(bitcoinAddress2.toString()); } } }
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); }
exchangeSpecification.setHost(defaultSpecification.getHost()); if (exchangeSpecification.getPlainTextUri() == null) { exchangeSpecification.setPlainTextUri(defaultSpecification.getPlainTextUri());
exchangeSpecification.setHost(defaultSpecification.getHost()); if (exchangeSpecification.getPlainTextUri() == null) { exchangeSpecification.setPlainTextUri(defaultSpecification.getPlainTextUri());