Examples of VirtExDepthWrapper


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

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

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

    List<LimitOrder> asks = VirtExAdapters.adaptOrders(VirtExDepth.getDepth().getAsks(), CurrencyPair.BTC_CAD, "ask", "");

    // Verify all fields filled
    assertThat(asks.get(0).getLimitPrice().doubleValue()).isEqualTo(500000.000000000);
    assertThat(asks.get(0).getType()).isEqualTo(OrderType.ASK);
    assertThat(asks.get(0).getTradableAmount().doubleValue()).isEqualTo(7.000000000);
View Full Code Here

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

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

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

    // Verify that the example data was unmarshalled correctly
    assertThat(virtExDepth.getDepth().getAsks().get(0)[0]).isEqualTo(new BigDecimal("500000.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.