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

Examples of com.xeiam.xchange.kraken.dto.marketdata.KrakenServerTime


    Exchange krakenExchange = ExchangeFactory.INSTANCE.createExchange(KrakenExchange.class.getName());

    // Interested in the public polling market data feed (no authentication)
    KrakenMarketDataServiceRaw krakenMarketDataService = (KrakenMarketDataServiceRaw) krakenExchange.getPollingMarketDataService();

    KrakenServerTime serverTime = krakenMarketDataService.getServerTime();
    System.out.println(serverTime);

    KrakenAssets assets = krakenMarketDataService.getKrakenAssets();
    System.out.println(assets);
View Full Code Here


    InputStream is = KrakenServerTimeJSONTest.class.getResourceAsStream("/marketdata/example-servertime-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenServerTimeResult krakenResult = mapper.readValue(is, KrakenServerTimeResult.class);
    KrakenServerTime serverTime = krakenResult.getResult();

    assertThat(serverTime.getUnixTime()).isEqualTo(1391835876);
    assertThat(serverTime.getRfc1123Time()).isEqualTo(DateUtils.fromRfc1123DateString("Sat,  8 Feb 14 05:04:36 +0000", Locale.US));
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.marketdata.KrakenServerTime

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.