Package com.xeiam.xchange.coinfloor.dto.streaming.marketdata

Examples of com.xeiam.xchange.coinfloor.dto.streaming.marketdata.CoinfloorOrderbook


  public Map<String, Object> adaptOrders(String data) throws ExchangeException {

    Map<String, Object> resultMap = new HashMap<String, Object>();

    CoinfloorOrderbook rawRetObj;
    try {
      rawRetObj = streamObjectMapper.readValue(data, CoinfloorOrderbook.class);
    } catch (IOException e) {
      throw new ExchangeException("JSON parse error", e);
    }
    resultMap.put("raw", rawRetObj);
    OrderBook orderbook;

    synchronized (cachedDataSynchronizationObject) {
      List<LimitOrder> bidList = (cachedOrderBook == null ? new ArrayList<LimitOrder>() : cachedOrderBook.getBids());
      List<LimitOrder> askList = (cachedOrderBook == null ? new ArrayList<LimitOrder>() : cachedOrderBook.getAsks());
      List<CoinfloorOrder> orders = rawRetObj.getOrders();

      if (orders != null) {
        for (CoinfloorOrder order : orders) {
          if (order.getBaseQty().doubleValue() > 0) {
            bidList.add(adaptOrder(order));
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinfloor.dto.streaming.marketdata.CoinfloorOrderbook

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.