Examples of KrakenServerTimeResult


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

    // Read in the JSON from the example resources
    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

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

    throw new ExchangeException("Kraken does not support the currency code " + currency);
  }

  public KrakenServerTime getServerTime() throws IOException {

    KrakenServerTimeResult timeResult = kraken.getServerTime();

    return checkResult(timeResult);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.