Examples of BTCTradeBalance


Examples of com.xeiam.xchange.btctrade.dto.account.BTCTradeBalance

  }

  private static void raw(Exchange exchange) {

    BTCTradeAccountServiceRaw accountService = (BTCTradeAccountServiceRaw) exchange.getPollingAccountService();
    BTCTradeBalance balance = accountService.getBTCTradeBalance();

    System.out.println("Balance result: " + balance.getResult());
    System.out.println("Balance message: " + balance.getMessage());
    System.out.println("Balance CNY balance: " + balance.getCnyBalance());
    System.out.println("Balance BTC balance: " + balance.getBtcBalance());
    System.out.println("Balance CNY reserved: " + balance.getCnyReserved());
    System.out.println("Balance BTC reserved: " + balance.getBtcReserved());

    BTCTradeWallet wallet = accountService.getBTCTradeWallet();
    System.out.println("Wallet address: " + wallet.getAddress());
  }
View Full Code Here

Examples of com.xeiam.xchange.btctrade.dto.account.BTCTradeBalance

  }

  @Test
  public void testAdaptAccountInfo() throws IOException {

    BTCTradeBalance balance = mapper.readValue(getClass().getResource("dto/account/balance.json"), BTCTradeBalance.class);

    AccountInfo accountInfo = BTCTradeAdapters.adaptAccountInfo(balance);
    assertNull(accountInfo.getUsername());
    assertNull(accountInfo.getTradingFee());
    assertEquals(new BigDecimal(3), accountInfo.getBalance(Currencies.BTC));
View Full Code Here

Examples of com.xeiam.xchange.btctrade.dto.account.BTCTradeBalance

  }

  @Test
  public void testAdaptAccountInfoError() throws IOException {

    BTCTradeBalance balance = mapper.readValue(getClass().getResource("dto/account/balance-signature-error.json"), BTCTradeBalance.class);

    try {
      BTCTradeAdapters.adaptAccountInfo(balance);
      fail("ExchangeException is expected.");
    } catch (ExchangeException e) {
View Full Code Here
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.