Package com.xeiam.xchange.service.polling

Examples of com.xeiam.xchange.service.polling.PollingAccountService


    raw(btcTrade);
  }

  private static void generic(Exchange exchange) throws IOException {

    PollingAccountService accountService = exchange.getPollingAccountService();
    AccountInfo accountInfo = accountService.getAccountInfo();
    System.out.println("Account info: " + accountInfo);

    String depositAddress = accountService.requestDepositAddress(Currencies.BTC);
    System.out.println("Deposit address: " + depositAddress);
  }
View Full Code Here


  public static void main(String[] args) throws Exception {

    CertHelper.trustAllCerts();

    Exchange exchange = CryptoTradeExampleUtils.createExchange();
    PollingAccountService accountService = exchange.getPollingAccountService();

    generic(accountService);
    raw((CryptoTradeAccountServiceRaw) accountService);
  }
View Full Code Here

  public static void main(String[] args) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException {

    Exchange exchange = BittrexExamplesUtils.getExchange();

    PollingAccountService accountService = exchange.getPollingAccountService();

    generic(accountService);
    raw((BittrexAccountServiceRaw) accountService);
  }
View Full Code Here

public class BitstampAccountDemo {

  public static void main(String[] args) throws IOException {

    Exchange bitstamp = BitstampDemoUtils.createExchange();
    PollingAccountService accountService = bitstamp.getPollingAccountService();

    generic(accountService);
    raw((BitstampAccountServiceRaw) accountService);
  }
View Full Code Here

  }

  private static void generic(Exchange exchange) throws IOException {

    // Interested in the private account functionality (authentication)
    PollingAccountService accountService = exchange.getPollingAccountService();

    // Get the account information
    AccountInfo accountInfo = accountService.getAccountInfo();
    System.out.println("BTCE AccountInfo as String: " + accountInfo.toString());
  }
View Full Code Here

    String username = args[0];
    String password = args[1];
    String ipAddress = args[2];

    Exchange coinsetter = CoinsetterExamplesUtils.getExchange(username, password, ipAddress);
    PollingAccountService accountService = coinsetter.getPollingAccountService();

    AccountInfo accountInfo = accountService.getAccountInfo();
    log.info("account info: {}", accountInfo);

    ((CoinsetterAccountService) accountService).logout();
  }
View Full Code Here

  public static void main(String[] args) throws IOException {

    Exchange ANX = ANXExamplesUtils.createExchange();

    // Interested in the private account functionality (authentication)
    PollingAccountService accountService = ANX.getPollingAccountService();

    // Request a Bitcoin deposit address
    String address = accountService.requestDepositAddress(Currencies.BTC.toString());
    System.out.println("Address to deposit Bitcoins to: " + address);
  }
View Full Code Here

  public static void main(String[] args) throws IOException {

    Exchange anx = ANXExamplesUtils.createExchange();

    // Interested in the private account functionality (authentication)
    PollingAccountService accountService = anx.getPollingAccountService();

    System.out.println("AccountInfo= " + accountService.getAccountInfo());

    // ANX does not return a transaction id on fund withdrawal at this moment
    String success = accountService.withdrawFunds("BTC", new BigDecimal("0.001"), "1DTZHQF47QzETutRRQVr2o2Rjcku8gBWft");
    System.out.println("result= " + success);
  }
View Full Code Here

  public static void main(String[] args) throws IOException {

    Exchange anx = ANXExamplesUtils.createExchange();

    // Interested in the private account functionality (authentication)
    PollingAccountService accountService = anx.getPollingAccountService();

    // Get the account information
    AccountInfo accountInfo = accountService.getAccountInfo();

    System.out.println("AccountInfo as String: " + accountInfo.toString());
  }
View Full Code Here

    Exchange campbx = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName());

    campbx.getExchangeSpecification().setUserName("XChange");
    campbx.getExchangeSpecification().setPassword("The Java API");

    PollingAccountService accountService = campbx.getPollingAccountService();

    AccountInfo accountInfo = accountService.getAccountInfo();
    System.out.println("accountInfo = " + accountInfo);

    String depositAddr = accountService.requestDepositAddress(Currencies.BTC);
    System.out.println("depositAddr = " + depositAddr);

    String txid = accountService.withdrawFunds("BTC", new BigDecimal("0.1"), "1FgpMU9CgQffjLK5YoR2yK5XGj5cq4iCBf");
    System.out.println("See the withdrawal transaction: http://blockchain.info/tx-index/" + txid);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.service.polling.PollingAccountService

Copyright © 2018 www.massapicom. 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.