class HitbtcMarketDataService extends HitbtcMarketDataServiceRaw
    implements MarketDataService {

  public HitbtcMarketDataService(Exchange exchange) {
    super(exchange);
  }

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

    return HitbtcAdapters.adaptTicker(getHitbtcTicker(currencyPair), currencyPair);
  }

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

  @Override
  public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {
    if (args == null || args.length == 0) {
      return HitbtcAdapters.adaptOrderBook(getHitbtcOrderBook(currencyPair), currencyPair);
    } else {
      Integer limit = (Integer) args[0];
      return HitbtcAdapters.adaptOrderBook(getHitbtcOrderBook(currencyPair, limit), currencyPair);
    }
  }

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

  public Trades getTradesCustom(
      CurrencyPair currencyPair,
      long fromTradeId,
      HitbtcTrade.HitbtcTradesSortField sortBy,
      HitbtcSort sortDirection,
      long limit)
      throws IOException {

    return HitbtcAdapters.adaptTrades(
        getHitbtcTrades(currencyPair, fromTradeId, sortBy, sortDirection, limit), currencyPair);
  }
}


    if (args == null || args.length == 0) {
      return HitbtcAdapters.adaptTrades(getHitbtcTrades(currencyPair), currencyPair);
    }

    long from = (Long) args[0]; // <trade_id> or <timestamp>
    HitbtcTrade.HitbtcTradesSortField sortBy =
        (HitbtcTrade.HitbtcTradesSortField) args[1]; // "trade_id" or "timestamp"
    HitbtcSort sortDirection = (HitbtcSort) args[2]; // "asc" or "desc"
    long startIndex = (Long) args[3]; // 0
    long max_results = (Long) args[4]; // max is 1000
    long offset = (Long) args[5]; // max is 100000

    return HitbtcAdapters.adaptTrades(
        getHitbtcTrades(currencyPair, from, sortBy, sortDirection, startIndex, max_results, offset),
        currencyPair);
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcCandle> getHitbtcCandles(org.knowm.xchange.currency.CurrencyPair, int, java.lang.String) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcCandle> getHitbtcCandles(org.knowm.xchange.currency.CurrencyPair, int, java.lang.String, java.lang.String) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcCandle> getHitbtcCandles(org.knowm.xchange.currency.CurrencyPair, int, java.lang.String, java.util.Date, java.util.Date, java.lang.String) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcCandle> getHitbtcCandles(org.knowm.xchange.currency.CurrencyPair, int, java.lang.String, int, java.lang.String) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcCurrency> getHitbtcCurrencies() throws java.io.IOException,public org.knowm.xchange.hitbtc.v2.dto.HitbtcCurrency getHitbtcCurrency(java.lang.String) throws java.io.IOException,public org.knowm.xchange.hitbtc.v2.dto.HitbtcOrderBook getHitbtcOrderBook(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public org.knowm.xchange.hitbtc.v2.dto.HitbtcOrderBook getHitbtcOrderBook(org.knowm.xchange.currency.CurrencyPair, java.lang.Integer) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcSymbol> getHitbtcSymbols() throws java.io.IOException,public org.knowm.xchange.hitbtc.v2.dto.HitbtcTicker getHitbtcTicker(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public Map<java.lang.String,org.knowm.xchange.hitbtc.v2.dto.HitbtcTicker> getHitbtcTickers() throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcTrade> getHitbtcTrades(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcTrade> getHitbtcTrades(org.knowm.xchange.currency.CurrencyPair, long, org.knowm.xchange.hitbtc.v2.dto.HitbtcTrade.HitbtcTradesSortField, org.knowm.xchange.hitbtc.v2.dto.HitbtcSort, long, long, long) throws java.io.IOException,public List<org.knowm.xchange.hitbtc.v2.dto.HitbtcTrade> getHitbtcTrades(org.knowm.xchange.currency.CurrencyPair, long, org.knowm.xchange.hitbtc.v2.dto.HitbtcTrade.HitbtcTradesSortField, org.knowm.xchange.hitbtc.v2.dto.HitbtcSort, long) throws java.io.IOException<variables>