Package com.xeiam.xchange.hitbtc.dto.marketdata

Examples of com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTrade


    HitbtcTrade[] allHitbtcTrades = hitbtcTrades.getHitbtcTrades();
    List<Trade> trades = new ArrayList<Trade>(allHitbtcTrades.length);
    long lastTradeId = 0;
    for (int i = 0; i < allHitbtcTrades.length; i++) {
      HitbtcTrade hitbtcTrade = allHitbtcTrades[i];

      Date timestamp = new Date(hitbtcTrade.getDate());
      BigDecimal price = hitbtcTrade.getPrice();
      BigDecimal amount = hitbtcTrade.getAmount();
      String tid = hitbtcTrade.getTid();
      long longTradeId = tid == null ? 0 : Long.parseLong(tid);
      if (longTradeId > lastTradeId)
        lastTradeId = longTradeId;
      Trade trade = new Trade(null, amount, currencyPair, price, timestamp, tid);
      trades.add(trade);
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTrade

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.