Package com.xeiam.xchange.kraken.dto.account

Examples of com.xeiam.xchange.kraken.dto.account.KrakenTradeBalanceInfo


    Exchange krakenExchange = KrakenExampleUtils.createTestExchange();

    KrakenAccountServiceRaw rawKrakenAcctService = (KrakenAccountServiceRaw) krakenExchange.getPollingAccountService();

    KrakenTradeBalanceInfo balanceInfo = rawKrakenAcctService.getKrakenTradeBalance();
    System.out.println(balanceInfo);

    Map<String, KrakenLedger> ledgerInfo = rawKrakenAcctService.getKrakenLedgerInfo();
    System.out.println(ledgerInfo);
View Full Code Here


    InputStream is = KrakenAccountJSONTest.class.getResourceAsStream("/account/example-tradebalanceinfo-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenTradeBalanceInfoResult krakenResult = mapper.readValue(is, KrakenTradeBalanceInfoResult.class);
    KrakenTradeBalanceInfo tradeBalanceInfo = krakenResult.getResult();

    assertThat(tradeBalanceInfo.getTradeBalance()).isEqualTo("71.6310");
    assertThat(tradeBalanceInfo.getMargin()).isEqualTo("0.0000");
    assertThat(tradeBalanceInfo.getFreeMargin()).isEqualTo("71.6310");
    assertThat(tradeBalanceInfo.getCostBasis()).isEqualTo("0.0000");
    assertThat(tradeBalanceInfo.getEquity()).isEqualTo("71.6310");
    assertThat(tradeBalanceInfo.getFloatingValuation()).isEqualTo("0.0000");
    assertThat(tradeBalanceInfo.getUnrealizedGainsLosses()).isEqualTo("0.0000");
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.account.KrakenTradeBalanceInfo

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.