Examples of CoinfloorOrderbook


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
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.