Adapts a IndependentReserveTicker to a Ticker Object

@param independentReserveTicker The exchange specific ticker
@param currencyPair (e.g. BTC/USD)
@return The ticker
424118
public static Ticker adaptTicker(
      IndependentReserveTicker independentReserveTicker, CurrencyPair currencyPair) {

    BigDecimal last = independentReserveTicker.getLast();
    BigDecimal bid = independentReserveTicker.getBid();
    BigDecimal ask = independentReserveTicker.getAsk();
    BigDecimal high = independentReserveTicker.getHigh();
    BigDecimal low = independentReserveTicker.getLow();
    BigDecimal vwap = independentReserveTicker.getVwap();
    BigDecimal volume = independentReserveTicker.getVolume();
    Date timestamp = independentReserveTicker.getTimestamp();

    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .last(last)
        .bid(bid)
        .ask(ask)
        .high(high)
        .low(low)
        .vwap(vwap)
        .volume(volume)
        .timestamp(timestamp)
        .build();
  }
951641
public OkCoinTickerResponse getFuturesTicker(CurrencyPair currencyPair, FuturesContract prompt)
      throws IOException {
    return okCoin.getFuturesTicker(OkCoinAdapters.adaptSymbol(currencyPair), prompt.getName());
  }
845072
public OkCoinTrade[] getTrades(CurrencyPair currencyPair, Long since) throws IOException {
    return okCoin.getTrades("1", OkCoinAdapters.adaptSymbol(currencyPair), since);
  }
338676
public static String formatCurrency(ITemplate template, Object data, String currencyCode) {
        return formatCurrency(template, data, currencyCode, null);
    }
906664
public static Trade adaptTrade(
      CryptonitTransaction tx, CurrencyPair currencyPair, int timeScale) {

    OrderType orderType = tx.getType() == 0 ? OrderType.BID : OrderType.ASK;
    final String tradeId = String.valueOf(tx.getTid());
    Date date =
        DateUtils.fromMillisUtc(
            tx.getDate()
                * timeScale); // polled order books provide a timestamp in seconds, stream in ms
    return new Trade(orderType, tx.getAmount(), currencyPair, tx.getPrice(), date, tradeId);
  }
1011609
public Optional<String> findCommonCcy(final CurrencyPair otherPair) {
        if (containsCcy(otherPair.getCcy1())) {
            return Optional.of(otherPair.getCcy1());
        }
        return containsCcy(otherPair.getCcy2()) ? Optional.of(otherPair.getCcy2()) : Optional.empty();
    }
1270973
public static BitfinexExecutedTradeSymbol executedTrades(final String currency, 
    		final String profitCurrency) {
    	
        final String currencyNonNull = Objects.requireNonNull(currency).toUpperCase();
        final String profitCurrencyNonNull = Objects.requireNonNull(profitCurrency).toUpperCase();
        
        return executedTrades(BitfinexCurrencyPair.of(currencyNonNull, profitCurrencyNonNull));
    }
1038785
public static final Renderer<Double> instance() { // NOPMD it's thread save!
    if (CurrencyDoubleRenderer.instanceRenderer == null) {
      synchronized (CurrencyDoubleRenderer.class) {
        if (CurrencyDoubleRenderer.instanceRenderer == null) {
          CurrencyDoubleRenderer.instanceRenderer = new CurrencyDoubleRenderer();
        }
      }
    }
    return CurrencyDoubleRenderer.instanceRenderer;
  }
994461
public BitZOrders getDepth(CurrencyPair currencyPair) throws IOException {
    BitZOrdersResult result = bitz.getDepth(BitZUtils.toPairString(currencyPair));
    return result.getData();
  }
1028349
public static Trade adaptTrade(CexIOTrade trade, CurrencyPair currencyPair) {

    BigDecimal amount = trade.getAmount();
    BigDecimal price = trade.getPrice();
    Date date = DateUtils.fromMillisUtc(trade.getDate() * 1000L);
    OrderType type = trade.getType().equals(ORDER_TYPE_BUY) ? OrderType.BID : OrderType.ASK;
    return new Trade(type, amount, currencyPair, price, date, String.valueOf(trade.getTid()));
  }
1070685
public static Ticker adaptTicker(PaymiumTicker PaymiumTicker, CurrencyPair currencyPair) {

    BigDecimal bid = PaymiumTicker.getBid();
    BigDecimal ask = PaymiumTicker.getAsk();
    BigDecimal high = PaymiumTicker.getHigh();
    BigDecimal low = PaymiumTicker.getLow();
    BigDecimal last = PaymiumTicker.getPrice();
    BigDecimal volume = PaymiumTicker.getVolume();
    Date timestamp = new Date(PaymiumTicker.getAt() * 1000L);

    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .bid(bid)
        .ask(ask)
        .high(high)
        .low(low)
        .last(last)
        .volume(volume)
        .timestamp(timestamp)
        .build();
  }
308223
public CreateAlipayChargeParams currency(final Currency currency) {
        return this.with("currency", currency == null ? Currency.MXN.name() : currency.name());
    }
1369789
public static Trade adaptTrade(WexTrade bTCETrade, CurrencyPair currencyPair) {

    OrderType orderType =
        bTCETrade.getTradeType().equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK;
    BigDecimal amount = bTCETrade.getAmount();
    BigDecimal price = bTCETrade.getPrice();
    Date date = DateUtils.fromMillisUtc(bTCETrade.getDate() * 1000L);

    final String tradeId = String.valueOf(bTCETrade.getTid());
    return new Trade(orderType, amount, currencyPair, price, date, tradeId);
  }
910186
public static Ticker adaptTicker(WexTicker bTCETicker, CurrencyPair currencyPair) {

    BigDecimal last = bTCETicker.getLast();
    BigDecimal bid = bTCETicker.getSell();
    BigDecimal ask = bTCETicker.getBuy();
    BigDecimal high = bTCETicker.getHigh();
    BigDecimal low = bTCETicker.getLow();
    BigDecimal avg = bTCETicker.getAvg();
    BigDecimal volume = bTCETicker.getVolCur();
    Date timestamp = DateUtils.fromMillisUtc(bTCETicker.getUpdated() * 1000L);

    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .last(last)
        .bid(bid)
        .ask(ask)
        .high(high)
        .low(low)
        .vwap(avg)
        .volume(volume)
        .timestamp(timestamp)
        .build();
  }
1338346
public static OrderBook adaptOrderBook(
      GatecoinDepthResult gatecoinDepthResult, CurrencyPair currencyPair, int timeScale) {

    List<LimitOrder> asks =
        createOrders(currencyPair, Order.OrderType.ASK, gatecoinDepthResult.getAsks());
    List<LimitOrder> bids =
        createOrders(currencyPair, Order.OrderType.BID, gatecoinDepthResult.getBids());
    Date date = new Date();
    return new OrderBook(date, asks, bids);
  }
1068003
public static Ticker adaptTicker(CryptopiaTicker cryptopiaTicker, CurrencyPair currencyPair) {
    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .last(cryptopiaTicker.getLast())
        .bid(cryptopiaTicker.getBid())
        .ask(cryptopiaTicker.getAsk())
        .high(cryptopiaTicker.getHigh())
        .low(cryptopiaTicker.getLow())
        .volume(cryptopiaTicker.getVolume())
        .timestamp(new Date())
        .build();
  }
1185462
public static Ticker adaptTicker(BTCTurkTicker btcTurkTicker) {
    CurrencyPair pair = btcTurkTicker.getPair();
    BigDecimal high = btcTurkTicker.getHigh();
    BigDecimal last = btcTurkTicker.getLast();
    Date timestamp = new Date(btcTurkTicker.getTimestamp());
    BigDecimal bid = btcTurkTicker.getBid();
    BigDecimal volume = btcTurkTicker.getVolume();
    BigDecimal low = btcTurkTicker.getLow();
    BigDecimal ask = btcTurkTicker.getAsk();
    BigDecimal open = btcTurkTicker.getOpen();
    BigDecimal average = btcTurkTicker.getAverage();

    return new Ticker.Builder()
        .currencyPair(pair != null ? pair : null)
        .last(last)
        .bid(bid)
        .ask(ask)
        .high(high)
        .low(low)
        .vwap(average)
        .open(open)
        .volume(volume)
        .timestamp(timestamp)
        .build();
  }