fromId = nullSafeToLong(idSpan.getStartId()); toId = nullSafeToLong(idSpan.getEndId());
fromOffset = Long.valueOf(idParams.getStartId()); } catch (Throwable ignored) {
@Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer limit = 200; if (params instanceof TradeHistoryParamPaging) { limit = ((TradeHistoryParamPaging) params).getPageLength(); } Long since = 0L; if (params instanceof TradeHistoryParamsIdSpan) { TradeHistoryParamsIdSpan tradeHistoryParamsIdSpan = (TradeHistoryParamsIdSpan) params; since = Long.valueOf(tradeHistoryParamsIdSpan.getStartId()); } CurrencyPair cp = null; if (params instanceof TradeHistoryParamCurrencyPair) { CurrencyPair paramsCp = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); if (paramsCp != null) { cp = paramsCp; } } BTCMarketsTradeHistory response = getBTCMarketsUserTransactions(cp, limit, since); return BTCMarketsAdapters.adaptTradeHistory(response.getTrades(), cp); }
TradeHistoryParamsIdSpan tradeHistoryParamsIdSpan = (TradeHistoryParamsIdSpan) params; String startId = tradeHistoryParamsIdSpan.getStartId(); if (startId != null) fromTransactionId = Long.valueOf(startId); String endId = tradeHistoryParamsIdSpan.getEndId(); if (endId != null) endTransactionId = Long.valueOf(endId);
fromId = BinanceAdapters.id(idParams.getStartId()); } catch (Throwable ignored) {
if (params instanceof TradeHistoryParamsIdSpan) { TradeHistoryParamsIdSpan paramsIdSpan = (TradeHistoryParamsIdSpan) params; fromId = paramsIdSpan.getStartId(); toId = paramsIdSpan.getEndId();
TradeHistoryParamsIdSpan trId = (TradeHistoryParamsIdSpan) params; try { sinceTradeId = Long.valueOf(trId.getStartId()); } catch (Throwable ignored) {
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
@Override public List<FundingRecord> getFundingHistory(TradeHistoryParams params) throws IOException { String currency = null; if (params instanceof TradeHistoryParamCurrency && ((TradeHistoryParamCurrency) params).getCurrency() != null) { currency = ((TradeHistoryParamCurrency) params).getCurrency().getCurrencyCode(); } else { // Currency is a required parameter for Huobi funding history query throw new ExchangeException("Currency must be supplied"); } String from = null; if (params instanceof TradeHistoryParamsIdSpan) { from = ((TradeHistoryParamsIdSpan) params).getStartId(); } FundingRecord.Type type = null; if (params instanceof HistoryParamsFundingType && ((HistoryParamsFundingType) params).getType() != null) { type = ((HistoryParamsFundingType) params).getType(); } else { // Funding history type is a required parameter for Huobi funding history query throw new ExchangeException( "Type 'deposit' or 'withdraw' must be supplied using FundingRecord.Type"); } // Adapt type out (replace withdrawal -> withdraw) String fundingRecordType = type == FundingRecord.Type.WITHDRAWAL ? "withdraw" : "deposit"; return HuobiAdapters.adaptFundingHistory( getDepositWithdrawalHistory(currency, fundingRecordType, from)); }
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
fromId = BinanceAdapters.id(idParams.getStartId()); } catch (Throwable ignored) {
fromId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
String startId = ((TradeHistoryParamsIdSpan) params).getStartId(); if (startId != null) { since = Integer.valueOf(startId);
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());
startId = nullSafeToLong(idParams.getStartId()); endId = nullSafeToLong(idParams.getEndId());