Package com.xeiam.xchange.itbit.v1.service.polling

Source Code of com.xeiam.xchange.itbit.v1.service.polling.ItBitAccountServiceRaw

package com.xeiam.xchange.itbit.v1.service.polling;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;

import si.mazi.rescu.SynchronizedValueFactory;

import com.xeiam.xchange.ExchangeSpecification;
import com.xeiam.xchange.NotYetImplementedForExchangeException;
import com.xeiam.xchange.itbit.v1.dto.account.ItBitAccountInfoReturn;

public class ItBitAccountServiceRaw extends ItBitBasePollingService {

  private final String userId;

  /**
   * Constructor
   *
   * @param exchangeSpecification The {@link ExchangeSpecification}
   */
  public ItBitAccountServiceRaw(ExchangeSpecification exchangeSpecification, SynchronizedValueFactory<Long> nonceFactory) {

    super(exchangeSpecification, nonceFactory);

    this.userId = (String) exchangeSpecification.getExchangeSpecificParametersItem("userId");
  }

  public ItBitAccountInfoReturn[] getItBitAccountInfo() throws IOException {

    ItBitAccountInfoReturn[] info = itBit.getInfo(signatureCreator, new Date().getTime(), valueFactory, userId);
    return info;
  }

  public String withdrawItBitFunds(String currency, BigDecimal amount, String address) throws IOException {

    throw new NotYetImplementedForExchangeException();
  }

  public String requestItBitDepositAddress(String currency, String... args) throws IOException {

    throw new NotYetImplementedForExchangeException();
  }

  public ItBitAccountInfoReturn getItBitAccountInfo(String walletId) throws IOException {

    ItBitAccountInfoReturn itBitAccountInfoReturn = itBit.getWallet(signatureCreator, new Date().getTime(), valueFactory, walletId);
    return itBitAccountInfoReturn;
  }
}
TOP

Related Classes of com.xeiam.xchange.itbit.v1.service.polling.ItBitAccountServiceRaw

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.