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

Examples of com.xeiam.xchange.kraken.dto.marketdata.results.KrakenSpreadsResult


  }

  private KrakenSpreads getKrakenSpreads(String tradableIdentifier, String currency, Long since) throws IOException {

    String krakenCurrencyPair = createKrakenCurrencyPair(tradableIdentifier, currency);
    KrakenSpreadsResult spreadsResult = kraken.getSpread(krakenCurrencyPair, since);

    return checkResult(spreadsResult);
  }
View Full Code Here


    // Read in the JSON from the example resources
    InputStream is = KrakenSpreadsJSONTest.class.getResourceAsStream("/marketdata/example-spreads-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenSpreadsResult krakenResult = mapper.readValue(is, KrakenSpreadsResult.class);
    KrakenSpreads spreads = krakenResult.getResult();

    assertThat(spreads.getLast()).isEqualTo(1391837200);
    KrakenSpread spread = spreads.getSpreads().get(0);
    assertThat(spread.getAsk()).isEqualTo("720.00000");
    assertThat(spread.getBid()).isEqualTo("709.17169");
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.marketdata.results.KrakenSpreadsResult

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.