org.knowm.xchange.examples.coinegg.CoinEggTickerDemo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-examples Show documentation
Show all versions of xchange-examples Show documentation
Provides a set of examples that demonstrate how to use XChange in client applications
The newest version!
package org.knowm.xchange.examples.coinegg;
import java.io.IOException;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeFactory;
import org.knowm.xchange.coinegg.CoinEggExchange;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.service.marketdata.MarketDataService;
/** Demonstrate requesting Ticker at CoinEgg */
public class CoinEggTickerDemo {
public static void main(String[] args) throws IOException {
// Create Default BitZ Instance
Exchange coinEgg = ExchangeFactory.INSTANCE.createExchange(CoinEggExchange.class);
// Get The Public Market Data Service
MarketDataService marketDataService = coinEgg.getMarketDataService();
// Currency Pair To Get Ticker Of
CurrencyPair pair = CurrencyPair.ETH_BTC;
// Print The Generic and Raw Ticker
System.out.println(marketDataService.getTicker(pair));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy