use of org.knowm.xchange.btcturk.dto.account.BTCTurkAccountBalance in project XChange by knowm.
the class AccountDataFetchIntegration method testBalance.
@Test
public void testBalance() throws IOException, InterruptedException {
if (!BTCTurkDemoUtilsTest.BTCTURK_APIKEY.isEmpty()) {
// BTCTurkAccountBalance Test
BTCTurkAccountBalance accountBalance = btcTurkAccountService.getBTCTurkBalance();
assertThat(accountBalance).isNotEqualTo(null);
assertThat(accountBalance.getBtctry_maker_fee_percentage()).isEqualTo(new BigDecimal("0.0012711860000000"));
// AccountInfo Test
Thread.sleep(1000);
AccountInfo accountInfo = btcTurkAccountService.getAccountInfo();
assertThat(accountInfo).isNotEqualTo(null);
} else
assertThat(accountService).isNotEqualTo(null);
}
use of org.knowm.xchange.btcturk.dto.account.BTCTurkAccountBalance in project XChange by knowm.
the class BTCTurkAdapters method adaptWallet.
public static Wallet adaptWallet(String name, BTCTurkAccountBalance btcTurkBalance) {
List<Balance> balances = new ArrayList<>(7);
balances.add(new Balance(Currency.TRY, null, btcTurkBalance.getTry_available(), btcTurkBalance.getTry_reserved()));
balances.add(new Balance(Currency.BTC, null, btcTurkBalance.getBtc_available(), btcTurkBalance.getBtc_reserved()));
balances.add(new Balance(Currency.ETH, null, btcTurkBalance.getEth_available(), btcTurkBalance.getEth_reserved()));
balances.add(new Balance(Currency.XRP, null, btcTurkBalance.getXrp_available(), btcTurkBalance.getXrp_reserved()));
balances.add(new Balance(Currency.LTC, null, btcTurkBalance.getLtc_available(), btcTurkBalance.getLtc_reserved()));
balances.add(new Balance(Currency.USDT, null, btcTurkBalance.getUsdt_available(), btcTurkBalance.getUsdt_reserved()));
balances.add(new Balance(Currency.XLM, null, btcTurkBalance.getXlm_available(), btcTurkBalance.getXlm_reserved()));
return Wallet.Builder.from(balances).id(name).name(name).build();
}
use of org.knowm.xchange.btcturk.dto.account.BTCTurkAccountBalance in project XChange by knowm.
the class BTCTurkAccountDemo method raw.
private static void raw(BTCTurkAccountServiceRaw accountService) throws IOException {
BTCTurkAccountBalance responseBalances = accountService.getBTCTurkBalance();
System.out.println(responseBalances.toString());
System.out.println(responseBalances.getBtc_balance().toString());
}
Aggregations