class KrakenMarketDataService extends KrakenMarketDataServiceRaw
    implements MarketDataService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public KrakenMarketDataService(Exchange exchange) {

    super(exchange);
  }

  @Override
  public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {

    return KrakenAdapters.adaptTicker(getKrakenTicker(currencyPair), currencyPair);
  }

  @Override
  public List<Ticker> getTickers(Params params) throws IOException {
    return KrakenAdapters.adaptTickers(getKrakenTickers());
  }

  @Override
  public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {<FILL_FUNCTION_BODY>}

  @Override
  public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException {

    Long since = null;

    if (args != null && args.length > 0) {
      Object arg0 = args[0];
      if (arg0 instanceof Long) {
        since = (Long) arg0;
      } else {
        throw new ExchangeException("args[0] must be of type Long!");
      }
    }

    KrakenPublicTrades krakenTrades = getKrakenTrades(currencyPair, since);
    return KrakenAdapters.adaptTrades(
        krakenTrades.getTrades(), currencyPair, krakenTrades.getLast());
  }
}


    long count = Long.MAX_VALUE;

    if (args != null && args.length > 0) {
      Object arg0 = args[0];
      if (arg0 instanceof Long) {
        count = (Long) arg0;
      } else if (arg0 instanceof Integer) {
        count = (Integer) arg0;
      } else {
        throw new ExchangeException("args[0] must be of type Long or Integer");
      }
    }

    KrakenDepth krakenDepth = getKrakenDepth(currencyPair, count);

    return KrakenAdapters.adaptOrderBook(krakenDepth, currencyPair);
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public transient org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs getKrakenAssetPairs(org.knowm.xchange.currency.CurrencyPair[]) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenDepth getKrakenDepth(org.knowm.xchange.currency.CurrencyPair, long) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenOHLCs getKrakenOHLC(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenOHLCs getKrakenOHLC(org.knowm.xchange.currency.CurrencyPair, java.lang.Integer, java.lang.Long) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenSpreads getKrakenSpreads(org.knowm.xchange.currency.Currency, org.knowm.xchange.currency.Currency) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenTicker getKrakenTicker(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public Map<java.lang.String,org.knowm.xchange.kraken.dto.marketdata.KrakenTicker> getKrakenTickers() throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenPublicTrades getKrakenTrades(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public org.knowm.xchange.kraken.dto.marketdata.KrakenPublicTrades getKrakenTrades(org.knowm.xchange.currency.CurrencyPair, java.lang.Long) throws java.io.IOException<variables>