if (args[0] instanceof Integer && (Integer) args[0] > 0 && (Integer) args[0] <= 50) {
depth = (Integer) args[0];
}
}
BittrexDepth bittrexDepth = getBittrexOrderBook(BittrexUtils.toPairString(currencyPair), depth);
List<LimitOrder> asks = BittrexAdapters.adaptOrders(bittrexDepth.getAsks(), currencyPair, "ask", "");
List<LimitOrder> bids = BittrexAdapters.adaptOrders(bittrexDepth.getBids(), currencyPair, "bid", "");
return new OrderBook(null, asks, bids);
}