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

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


   */
  public Map<String, KrakenLedger> getKrakenLedgerInfo(LedgerType ledgerType, String start, String end, String offset, String... assets) throws IOException {

    String ledgerTypeString = (ledgerType == null) ? "all" : ledgerType.toString().toLowerCase();

    KrakenLedgerResult ledgerResult = kraken.ledgers(null, delimitAssets(assets), ledgerTypeString, start, end, offset, exchangeSpecification.getApiKey(), signatureCreator, nextNonce());
    return checkResult(ledgerResult).getLedgerMap();
  }
View Full Code Here


    // Read in the JSON from the example resources
    InputStream is = KrakenAccountJSONTest.class.getResourceAsStream("/account/example-ledgerinfo-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenLedgerResult krakenResult = mapper.readValue(is, KrakenLedgerResult.class);
    Map<String, KrakenLedger> ledgerInfo = krakenResult.getResult().getLedgerMap();
    KrakenLedger ledger = ledgerInfo.get("LQY6IE-WNT47-JRBOJV");

    assertThat(ledger.getAsset()).isEqualTo("XXBT");
    assertThat(ledger.getAssetClass()).isEqualTo("currency");
    assertThat(ledger.getBalance()).isEqualTo("0.1000000000");
View Full Code Here

TOP

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

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.