Adapts a BitbayTicker to a Ticker Object

@param bitbayTicker The exchange specific ticker
@param currencyPair (e.g. BTC/USD)
@return The ticker
771759
public static Ticker adaptTicker(BitbayTicker bitbayTicker, CurrencyPair currencyPair) {

    BigDecimal ask = bitbayTicker.getAsk();
    BigDecimal bid = bitbayTicker.getBid();
    BigDecimal high = bitbayTicker.getMax();
    BigDecimal low = bitbayTicker.getMin();
    BigDecimal volume = bitbayTicker.getVolume();
    BigDecimal last = bitbayTicker.getLast();

    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .last(last)
        .bid(bid)
        .ask(ask)
        .high(high)
        .low(low)
        .volume(volume)
        .build();
  }
1085075
public VircurexLastTrade getVircurexTicker(CurrencyPair currencyPair) throws IOException {

    VircurexLastTrade vircurexLastTrade =
        vircurexAuthenticated.getLastTrade(
            currencyPair.base.getCurrencyCode().toLowerCase(),
            currencyPair.counter.getCurrencyCode().toLowerCase());

    return vircurexLastTrade;
  }
1156759
public static Trades adaptTrades(WexTrade[] bTCETrades, CurrencyPair currencyPair) {

    List<Trade> tradesList = new ArrayList<>();
    long lastTradeId = 0;
    for (WexTrade bTCETrade : bTCETrades) {
      // Date is reversed order. Insert at index 0 instead of appending
      long tradeId = bTCETrade.getTid();
      if (tradeId > lastTradeId) {
        lastTradeId = tradeId;
      }
      tradesList.add(0, adaptTrade(bTCETrade, currencyPair));
    }
    return new Trades(tradesList, lastTradeId, TradeSortType.SortByID);
  }
225186
public static Trades adaptTrades(
      MercadoBitcoinTransaction[] transactions, CurrencyPair currencyPair) {

    List<Trade> trades = new ArrayList<>();
    long lastTradeId = 0;
    for (MercadoBitcoinTransaction tx : transactions) {
      final long tradeId = tx.getTid();
      if (tradeId > lastTradeId) {
        lastTradeId = tradeId;
      }
      trades.add(
          new Trade(
              toOrderType(tx.getType()),
              tx.getAmount(),
              currencyPair,
              tx.getPrice(),
              DateUtils.fromMillisUtc(tx.getDate() * 1000L),
              String.valueOf(tradeId)));
    }

    return new Trades(trades, lastTradeId, Trades.TradeSortType.SortByID);
  }
606006
public static Ticker adaptTicker(HuobiTicker huobiTicker, CurrencyPair currencyPair) {
    Ticker.Builder builder = new Ticker.Builder();
    builder.open(huobiTicker.getOpen());
    builder.ask(huobiTicker.getAsk().getPrice());
    builder.bid(huobiTicker.getBid().getPrice());
    builder.last(huobiTicker.getClose());
    builder.high(huobiTicker.getHigh());
    builder.low(huobiTicker.getLow());
    builder.volume(huobiTicker.getVol());
    builder.timestamp(huobiTicker.getTs());
    builder.currencyPair(currencyPair);
    return builder.build();
  }
1325084
public static Ticker adaptTicker(
      BitcoinAverageTicker bitcoinAverageTicker, CurrencyPair currencyPair) {

    BigDecimal last = bitcoinAverageTicker.getLast();
    BigDecimal bid = bitcoinAverageTicker.getBid();
    BigDecimal ask = bitcoinAverageTicker.getAsk();
    Date timestamp = bitcoinAverageTicker.getTimestamp();
    BigDecimal volume = bitcoinAverageTicker.getVolume();

    return new Ticker.Builder()
        .currencyPair(currencyPair)
        .last(last)
        .bid(bid)
        .ask(ask)
        .volume(volume)
        .timestamp(timestamp)
        .build();
  }
1347107
public Object getKlines(CurrencyPair currencyPair) throws IOException {

    Map<String, String> data = new HashMap<String, String>();
    data.put("symbol", currencyPair.toString());

    RestRequestParam parameters =
        RestApiRequestHandler.generateRequestParam(data, this.apiKey, this.secretKey);

    return coinsuper.getKlines(parameters);
  }
121922
public static OrderBook adaptOrderBook(
      BTCTurkOrderBook btcTurkOrderBook, CurrencyPair currencyPair) {
    List<LimitOrder> asks =
        createOrders(currencyPair, Order.OrderType.ASK, btcTurkOrderBook.getAsks());
    List<LimitOrder> bids =
        createOrders(currencyPair, Order.OrderType.BID, btcTurkOrderBook.getBids());
    return new OrderBook(btcTurkOrderBook.getTimestamp(), asks, bids);
  }
123255
public static Trades adaptTrades(EXXTransaction[] transactions, CurrencyPair currencyPair) {
    List<Trade> trades = new ArrayList<>();
    long lastTradeId = 0;
    for (EXXTransaction transaction : transactions) {
      final long tradeId = transaction.getTid();
      if (tradeId > lastTradeId) {
        lastTradeId = tradeId;
      }
      OrderType orderType = OrderType.BID;
      if (transaction.getType().equals("sell")) orderType = OrderType.ASK;
      trades.add(
          new Trade.Builder()
              .id(String.valueOf(transaction.getTid()))
              .originalAmount((transaction.getAmount()))
              .price(transaction.getPrice())
              .timestamp(new Date(transaction.getDate()))
              .currencyPair(currencyPair)
              .type(orderType)
              .build());
    }

    return new Trades(trades, lastTradeId, TradeSortType.SortByID);
  }
601013
public static Trade adaptTrade(
      CoingiUserTransaction tx, CurrencyPair currencyPair, int timeScale) {

    OrderType orderType = tx.getType() == 0 ? OrderType.BID : OrderType.ASK;
    final String tradeId = tx.getId();
    Date date =
        DateUtils.fromMillisUtc(
            tx.getTimestamp()
                * timeScale); // polled order books provide a timestamp in seconds, stream in ms
    return new Trade(orderType, tx.getBaseAmount(), currencyPair, tx.getPrice(), date, tradeId);
  }
94604
public static BitfinexTickerSymbol ticker(final String currency, final String profitCurrency) {
    	
        final String currencyNonNull = Objects.requireNonNull(currency).toUpperCase();
        final String profitCurrencyNonNull = Objects.requireNonNull(profitCurrency).toUpperCase();
        
        return ticker(BitfinexCurrencyPair.of(currencyNonNull, profitCurrencyNonNull));
    }
438568
def as_currency(self, currency='USD', locale=LOCALE_OBJ, *args, **kwargs):
        
        f = Formatter(
            as_currency(currency=currency, locale=locale),
            args,
            kwargs
        )
        return self._add_formatter(f)
547635
BitcointoyouPublicTrade[] getBitcointoyouPublicTrades(CurrencyPair currencyPair)
      throws IOException {

    try {
      return getBitcointoyouPublicTrades(currencyPair, null, null);
    } catch (BitcointoyouException e) {
      throw new ExchangeException(e.getError());
    }
  }
1000865
public CreateCardChargeParams currency(final Currency currency) {
        return this.with("currency", currency == null ? Currency.MXN.name() : currency.name());
    }
755469
public static OrderBook adaptOrderBook(
      MercadoBitcoinOrderBook mercadoBitcoinOrderBook, CurrencyPair currencyPair) {

    List<LimitOrder> asks =
        createOrders(currencyPair, OrderType.ASK, mercadoBitcoinOrderBook.getAsks());
    List<LimitOrder> bids =
        createOrders(currencyPair, OrderType.BID, mercadoBitcoinOrderBook.getBids());
    return new OrderBook(null, asks, bids);
  }
1005106
BitcointoyouPublicTrade[] getBitcointoyouPublicTrades(
      CurrencyPair currencyPair, Long tradeTimestamp, Long minTradeId) throws IOException {

    String currency = currencyPair.base.toString();

    try {
      return bitcointoyou.getTrades(currency, tradeTimestamp, minTradeId);
    } catch (BitcointoyouException e) {
      throw new ExchangeException(e.getError());
    }
  }
125756
public BitZTicker getTicker(CurrencyPair currencyPair) throws IOException {
    BitZTickerResult result = bitz.getTicker(BitZUtils.toPairString(currencyPair));
    return result.getData();
  }