Package com.xeiam.xchange.poloniex.dto.marketdata

Examples of com.xeiam.xchange.poloniex.dto.marketdata.PoloniexMarketData


      marketData = poloniex.getTicker(command);
    } catch (PoloniexException e) {
      throw new ExchangeException(e.getError());
    }

    PoloniexMarketData data = marketData.get(pairString);

    return new PoloniexTicker(data, currencyPair);

  }
View Full Code Here


public class PoloniexAdapters {

  public static Ticker adaptPoloniexTicker(PoloniexTicker poloniexTicker, CurrencyPair currencyPair) {

    PoloniexMarketData marketData = poloniexTicker.getPoloniexMarketData();

    BigDecimal last = marketData.getLast();
    BigDecimal bid = marketData.getHighestBid();
    BigDecimal ask = marketData.getLowestAsk();
    BigDecimal high = null;
    BigDecimal low = null;
    BigDecimal volume = marketData.getQuoteVolume();

    Date timestamp = new Date();

    return new Ticker.Builder().currencyPair(currencyPair).last(last).bid(bid).ask(ask).high(high).low(low).volume(volume).timestamp(timestamp).build();
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.poloniex.dto.marketdata.PoloniexMarketData

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.