Get market depth from exchange

@param currencyPair Currency pair for getting info about
@param args Optional arguments. Exchange-specific
@return The OrderBook
@throws IOException
189318
@Override
  public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {

    String marketName = DSXAdapters.currencyPairToMarketName(currencyPair);

    String accountType = null;
    try {
      if (args != null) {
        accountType = (String) args[0];
      }
    } catch (ArrayIndexOutOfBoundsException e) {
      // ignore, can happen if no argument given.
    }

    DSXOrderbookWrapper dsxOrderbookWrapper = getDSXOrderbook(marketName, accountType);
    DSXOrderbook orderbook = dsxOrderbookWrapper.getOrderbook(marketName);

    // Adapt to XChange DTOs
    List<LimitOrder> asks = DSXAdapters.adaptOrders(orderbook.getAsks(), currencyPair, "ask", "");
    List<LimitOrder> bids = DSXAdapters.adaptOrders(orderbook.getBids(), currencyPair, "bid", "");

    return new OrderBook(null, asks, bids);
  }
547635
BitcointoyouPublicTrade[] getBitcointoyouPublicTrades(CurrencyPair currencyPair)
      throws IOException {

    try {
      return getBitcointoyouPublicTrades(currencyPair, null, null);
    } catch (BitcointoyouException e) {
      throw new ExchangeException(e.getError());
    }
  }
181046
def returnOrderBook(self, currencyPair='all', depth='50'):
        """"""
        return self._public('returnOrderBook', currencyPair=currencyPair,
                            depth=depth)
47836
public List<OkCoinKline> getKlines(CurrencyPair currencyPair, OkCoinKlineType type)
      throws IOException {
    return getKlines(currencyPair, type, null, null);
  }
464435
@Override
  public UserTrades getTradeHistory(TradeHistoryParams params)
      throws ExchangeException, IOException {

    CurrencyPair pair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair();
    List<GateioTrade> userTrades = getGateioTradeHistory(pair).getTrades();

    return GateioAdapters.adaptUserTrades(userTrades);
  }
486836
public static BitfinexOrderBookSymbol orderBook(final String currency, final String profitCurrency, 
    		final BitfinexOrderBookSymbol.Precision precision,
    		final BitfinexOrderBookSymbol.Frequency frequency, final int pricePoints) {
    	
        final String currencyNonNull = Objects.requireNonNull(currency).toUpperCase();
        final String profitCurrencyNonNull = Objects.requireNonNull(profitCurrency).toUpperCase();
        
        return orderBook(BitfinexCurrencyPair.of(currencyNonNull, profitCurrencyNonNull), precision, frequency, pricePoints);
    }
1289442
public static BitfinexOrderBookSymbol rawOrderBook(final String currency, final String profitCurrency) {
        final String currencyNonNull = Objects.requireNonNull(currency).toUpperCase();
        final String profitCurrencyNonNull = Objects.requireNonNull(profitCurrency).toUpperCase();
        
        return rawOrderBook(BitfinexCurrencyPair.of(currencyNonNull, profitCurrencyNonNull));
    }
101346
public OkCoinFutureHoldAmount[] getFutureHoldAmount(
      CurrencyPair currencyPair, FuturesContract contractType) throws IOException {
    return okCoin.getFutureHoldAmount(
        "1", OkCoinAdapters.adaptSymbol(currencyPair), contractType.getName());
  }
1014954
@Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {

    CoinsuperTradeHistoryParams coinsuperTradeHistoryParams = (CoinsuperTradeHistoryParams) params;
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put("orderNoList", coinsuperTradeHistoryParams.getOrderNoList());

    CoinsuperResponse<List<OrderDetail>> orderDetails = orderDetails(parameters);
    // System.out.println(data);

    // CoinsuperUserTransaction[] coinsuperUserTransaction = null;

    return CoinsuperAdapters.adaptTradeHistory(orderDetails);
  }
634629
public static BitfinexOrderBookSymbol rawOrderBook(final BitfinexCurrencyPair currencyPair) {
        return new BitfinexOrderBookSymbol(currencyPair, BitfinexOrderBookSymbol.Precision.R0, null, null);
    }
1085075
public VircurexLastTrade getVircurexTicker(CurrencyPair currencyPair) throws IOException {

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

    return vircurexLastTrade;
  }
1360307
public List<HitbtcTrade> getHitbtcTrades(
      CurrencyPair currencyPair,
      long from,
      HitbtcTrade.HitbtcTradesSortField sortBy,
      HitbtcSort sortDirection,
      long startIndex,
      long maxResults,
      long offset)
      throws IOException {

    return hitbtc.getTrades(HitbtcAdapters.adaptCurrencyPair(currencyPair), maxResults, offset);
  }
1088646
public OkCoinDepth getDepth(CurrencyPair currencyPair, Integer size) throws IOException {
    size = (size == null || size < 1 || size > 200) ? 200 : size;
    return okCoin.getDepth("1", OkCoinAdapters.adaptSymbol(currencyPair), size);
  }
325632
def get_market_book(symbols=None, **kwargs):
    
    import warnings
    warnings.warn(WNG_MSG % ("get_market_book", "iexdata.get_deep_book"))
    return Book(symbols, **kwargs).fetch()
250543
public OkCoinDepth getFuturesDepth(CurrencyPair currencyPair, FuturesContract prompt)
      throws IOException {
    return okCoin.getFuturesDepth(
        "1", OkCoinAdapters.adaptSymbol(currencyPair), prompt.getName().toLowerCase());
  }
1344468
public static String adaptCurrencyPair(CurrencyPair currencyPair) {
    return currencyPair.base.getCurrencyCode().toLowerCase()
        + currencyPair.counter.getCurrencyCode().toLowerCase();
  }
893057
public static BitfinexOrderBookSymbol orderBook(final BitfinexCurrencyPair currencyPair, 
    		final BitfinexOrderBookSymbol.Precision precision,
    		final BitfinexOrderBookSymbol.Frequency frequency, final int pricePoints) {
    	
        if (precision == BitfinexOrderBookSymbol.Precision.R0) {
            throw new IllegalArgumentException("Use BitfinexSymbols#rawOrderBook() factory method instead");
        }
        
        return new BitfinexOrderBookSymbol(currencyPair, precision, frequency, pricePoints);
    }