}
@Override
public UserTrades getTradeHistory(Object... args) throws IOException {
CryptoTradeQueryParamsBuilder paramsBuilder = CryptoTradeHistoryQueryParams.getQueryParamsBuilder();
if (args != null) {
switch (args.length) {
case 7:
if (args[6] != null && args[6] instanceof CurrencyPair) {
paramsBuilder.withCurrencyPair((CurrencyPair) args[6]);
}
case 6:
if (args[5] != null && args[5] instanceof CryptoTradeOrdering) {
paramsBuilder.withOrdering((CryptoTradeOrdering) args[5]);
}
case 5:
if (args[4] != null && args[4] instanceof Integer) {
paramsBuilder.withCount((Integer) args[4]);
}
case 4:
if (args[3] != null && args[3] instanceof Long) {
paramsBuilder.withEndDate((Long) args[3]);
}
case 3:
if (args[2] != null && args[2] instanceof Long) {
paramsBuilder.withStartDate((Long) args[2]);
}
case 2:
if (args[1] != null && args[1] instanceof Long) {
paramsBuilder.withEndId((Long) args[1]);
}
case 1:
if (args[0] != null && args[0] instanceof Long) {
paramsBuilder.withStartId((Long) args[0]);
}
}
}
CryptoTradeTrades tradeHistory = super.getCryptoTradeTradeHistory(paramsBuilder.build());
return CryptoTradeAdapters.adaptTrades(tradeHistory);
}