Examples of VirtExTickerWrapper


Examples of com.xeiam.xchange.virtex.v2.dto.marketdata.VirtExTickerWrapper

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

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    VirtExTickerWrapper VirtExTicker = mapper.readValue(is, VirtExTickerWrapper.class);

    Ticker ticker = VirtExAdapters.adaptTicker(VirtExTicker.getTicker(), CurrencyPair.BTC_CAD);
    System.out.println(ticker.toString());

    assertThat(ticker.getLast().toString()).isEqualTo("545.060000000");
    assertThat(ticker.getLow().toString()).isEqualTo("538.000000000");
    assertThat(ticker.getHigh().toString()).isEqualTo("574.000000000");
View Full Code Here

Examples of com.xeiam.xchange.virtex.v2.dto.marketdata.VirtExTickerWrapper

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

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    VirtExTickerWrapper virtExTickerWrapper = mapper.readValue(is, VirtExTickerWrapper.class);
    VirtExTicker virtExTicker = virtExTickerWrapper.getTicker();

    // Verify that the example data was unmarshalled correctly
    assertThat(virtExTicker.getLast()).isEqualTo(new BigDecimal("545.060000000"));
    assertThat(virtExTicker.getHigh()).isEqualTo(new BigDecimal("574.000000000"));
    assertThat(virtExTicker.getLow()).isEqualTo(new BigDecimal("538.000000000"));
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.