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

com.xeiam.xchange.vircurex.service.polling.VircurexAccountServiceRaw Maven / Gradle / Ivy

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

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.vircurex.VircurexUtils;
import com.xeiam.xchange.vircurex.dto.account.VircurexAccountInfoReturn;
import com.xeiam.xchange.vircurex.service.VircurexSha2Digest;

public class VircurexAccountServiceRaw extends VircurexBasePollingService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public VircurexAccountServiceRaw(Exchange exchange) {

    super(exchange);
  }

  public VircurexAccountInfoReturn getVircurexAccountInfo() throws IOException {

    String timestamp = VircurexUtils.getUtcTimestamp();
    long nonce = exchange.getNonceFactory().createValue();
    VircurexSha2Digest digest = new VircurexSha2Digest(exchange.getExchangeSpecification().getApiKey(),
        exchange.getExchangeSpecification().getUserName(), timestamp, nonce, "get_balances");
    VircurexAccountInfoReturn info = vircurexAuthenticated.getInfo(exchange.getExchangeSpecification().getUserName(), nonce, digest.toString(),
        timestamp);
    return info;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy