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

Examples of com.xeiam.xchange.kraken.dto.marketdata.KrakenSpreads$KrakenSpreadsDeserializer


    System.out.println(serverTime);

    KrakenAssets assets = krakenMarketDataService.getKrakenAssets();
    System.out.println(assets);

    KrakenSpreads spreads = krakenMarketDataService.getKrakenSpreads(Currencies.BTC, Currencies.USD);
    System.out.println(spreads);
  }
View Full Code Here


    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");
    assertThat(spread.getTime()).isEqualTo(1391836639);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.marketdata.KrakenSpreads$KrakenSpreadsDeserializer

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.