Examples of VirtExTradesWrapper


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

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

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

    Trades trades = VirtExAdapters.adaptTrades(VirtExTrades.getTrades(), CurrencyPair.BTC_CAD);
    assertThat(trades.getTrades().size()).isEqualTo(632);

    // Verify all fields filled
    assertThat(trades.getTrades().get(0).getPrice().doubleValue() == 545.060000000);
    assertThat(trades.getTrades().get(0).getTradableAmount().doubleValue() == 1.189100000);
View Full Code Here

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

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

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    VirtExTradesWrapper virtExTradesWrapper = mapper.readValue(is, VirtExTradesWrapper.class);
    ArrayList<VirtExTrade> virtexTrades = virtExTradesWrapper.getTrades();

    // Verify that the example data was unmarshalled correctly
    assertThat(virtexTrades.get(0).getPrice()).isEqualTo(new BigDecimal("545.060000000"));
  }
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.