All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xeiam.xchange.quoine.service.polling.QuoineAccountServiceRaw Maven / Gradle / Ivy

The newest version!
package com.xeiam.xchange.quoine.service.polling;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.exceptions.ExchangeException;
import com.xeiam.xchange.quoine.dto.account.QuoineAccountInfo;
import com.xeiam.xchange.quoine.dto.account.QuoineTradingAccountInfo;
import com.xeiam.xchange.utils.Assert;

import si.mazi.rescu.HttpStatusIOException;

public class QuoineAccountServiceRaw extends QuoineBasePollingService {

  /**
   * Constructor
   */
  protected QuoineAccountServiceRaw(Exchange exchange) {

    super(exchange);

    Assert.notNull(exchange.getExchangeSpecification().getSslUri(), "Exchange specification URI cannot be null");
  }

  public QuoineAccountInfo getQuoineAccountInfo() throws IOException {

    try {
      return quoine.getAccountInfo(device, userID, userToken);
    } catch (HttpStatusIOException e) {
      throw new ExchangeException(e.getHttpBody());
    }
  }

  public QuoineTradingAccountInfo[] getQuoineTradingAccountInfo() throws IOException {

    try {
      return quoine.getTradingAccountInfo(device, userID, userToken);
    } catch (HttpStatusIOException e) {
      throw new ExchangeException(e.getHttpBody());
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy