public class TradesDemo {
public static void main(String[] args) throws IOException {
// Use the factory to get Cex.IO exchange API using default settings
Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class.getName());
// Interested in the public polling market data feed (no authentication)
PollingMarketDataService marketDataService = exchange.getPollingMarketDataService();
// Get the latest trade data for GHs/BTC since tid=5635556
Trades trades = marketDataService.getTrades(new CurrencyPair(Currencies.GHs, Currencies.BTC), 5909107);
System.out.println("Trades Size= " + trades.getTrades().size());
System.out.println(trades.toString());