Package com.xeiam.xchange.cryptsy.dto

Examples of com.xeiam.xchange.cryptsy.dto.CryptsyOrder


    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    List<CryptsyOrder> cryptsyTrades = mapper.readValue(is, CryptsyMarketTradesReturn.class).getReturnValue();

    CryptsyOrder trade = cryptsyTrades.get(0);

    assertEquals(trade.getPrice(), new BigDecimal("0.00006103"));
    assertEquals(trade.getQuantity(), new BigDecimal("124.81824536"));
    assertEquals(trade.getTotal(), new BigDecimal("0.00761766"));
    assertEquals(trade.getTradeId(), 45360522);
    assertEquals(trade.getType(), CryptsyOrderType.Sell);

    trade = cryptsyTrades.get(999);

    assertEquals(trade.getPrice(), new BigDecimal("0.00006180"));
    assertEquals(trade.getQuantity(), new BigDecimal("2.82427886"));
    assertEquals(trade.getTotal(), new BigDecimal("0.00017454"));
    assertEquals(trade.getTradeId(), 45233881);
    assertEquals(trade.getType(), CryptsyOrderType.Buy);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.cryptsy.dto.CryptsyOrder

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.