CoinsetterClientSession clientSession = clientSessionService.login(username, password, ipAddress);
log.info("Client session: {}", clientSession);
// Add
CoinsetterPriceAlertRequest request = new CoinsetterPriceAlertRequest("EMAIL", "CROSSES", new BigDecimal("123.12"), "BTCUSD");
CoinsetterPriceAlertResponse addResponse = priceAlertService.add(clientSession.getUuid(), request);
log.info("add price alert response: {}", addResponse);
// List
CoinsetterPriceAlertList priceAlerts = priceAlertService.list(clientSession.getUuid());
for (CoinsetterPriceAlert alert : priceAlerts.getPriceAlerts()) {
log.info("{}", alert);
}
// Remove
CoinsetterRemovePriceAlertResponse removeResponse = priceAlertService.remove(clientSession.getUuid(), addResponse.getUuid());
log.info("remove price alert response: {}", removeResponse);
clientSessionService.logout(clientSession.getUuid());
}