log.info("OrderBook(null, null): {}", orderBook);
}
private static void raw(Exchange exchange) throws IOException {
CoinsetterMarketDataServiceRaw marketDataService = (CoinsetterMarketDataServiceRaw) exchange.getPollingMarketDataService();
CoinsetterLast last = marketDataService.getCoinsetterLast();
log.info("Coinsetter last: {}", last);
last = marketDataService.getCoinsetterLast(5);
log.info("Coinsetter last 5: {}", last);
CoinsetterTicker ticker = marketDataService.getCoinsetterTicker();
log.info("Coinsetter ticker: {}", ticker);
CoinsetterPairedDepth pairedDepth = marketDataService.getCoinsetterPairedDepth(10, "SMART");
log.info("Coinsetter paired depth: {}", pairedDepth);
CoinsetterListDepth fullDepth = marketDataService.getCoinsetterFullDepth("SMART");
log.info("Coinsetter full depth: {}", fullDepth);
CoinsetterQuote quoteBid = marketDataService.getCoinsetterQuote(new BigDecimal("5"), "BTCUSD");
log.info("Coinsetter quote bid: {}", quoteBid);
CoinsetterQuote quoteAsk = marketDataService.getCoinsetterQuote(new BigDecimal("-5"), "BTCUSD");
log.info("Coinsetter quote ask: {}", quoteAsk);
try {
// Invalid quoting quantity.
marketDataService.getCoinsetterQuote(new BigDecimal("1"), "BTCUSD");
} catch (CoinsetterException e) {
log.info("Message: {}", e.getMessage());
}
}