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

Examples of com.xeiam.xchange.kraken.dto.account.results.KrakenTradeBalanceInfoResult


  public KrakenTradeBalanceInfo getKrakenTradeBalance(String valuationCurrency) throws IOException {

    if (valuationCurrency != null)
      valuationCurrency = getKrakenCurrencyCode(valuationCurrency);

    KrakenTradeBalanceInfoResult balanceResult = kraken.tradeBalance(null, valuationCurrency, exchangeSpecification.getApiKey(), signatureCreator, nextNonce());
    return checkResult(balanceResult);
  }
View Full Code Here


    // Read in the JSON from the example resources
    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");
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.account.results.KrakenTradeBalanceInfoResult

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.