if (params instanceof TradeHistoryParamsSorted) { order = ((TradeHistoryParamsSorted) params).getOrder().equals(TradeHistoryParamsSorted.Order.desc) ? "DESC" : "ASC";
@Override public List<FundingRecord> getFundingHistory(TradeHistoryParams params) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamCurrencyPair) { currencyPair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } CryptonitUserTransaction[] txs = getCryptonitUserTransactions(limit, offset, sort == null ? null : sort.toString()); return CryptonitAdapters.adaptFundingHistory(Arrays.asList(txs)); } }
/** Required parameter types: {@link TradeHistoryParamPaging#getPageLength()} */ @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamCurrencyPair) { currencyPair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } BitstampUserTransaction[] txs = getBitstampUserTransactions( limit, currencyPair, offset, sort == null ? null : sort.toString()); return BitstampAdapters.adaptTradeHistory(txs); }
@Override public List<FundingRecord> getFundingHistory(TradeHistoryParams params) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } BitstampUserTransaction[] txs = getBitstampUserTransactions(limit, offset, sort == null ? null : sort.toString()); return BitstampAdapters.adaptFundingHistory(Arrays.asList(txs)); } }
if (order != null) sort = order.equals(TradeHistoryParamsSorted.Order.desc) ? DSXAuthenticatedV2.SortOrder.DESC : DSXAuthenticatedV2.SortOrder.ASC;
TradeHistoryParamsSorted.Order order = ((TradeHistoryParamsSorted) params).getOrder(); if (order != null) { if (order.equals(TradeHistoryParamsSorted.Order.asc)) sort = "asc"; else sort = "desc";
/** Required parameter types: {@link TradeHistoryParamPaging#getPageLength()} */ @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamCurrencyPair) { currencyPair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } CryptonitUserTransaction[] txs = getCryptonitUserTransactions( limit, currencyPair, offset, sort == null ? null : sort.toString()); return CryptonitAdapters.adaptTradeHistory(txs); }
@Override public List<FundingRecord> getFundingHistory(TradeHistoryParams params) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } BitstampUserTransaction[] txs = getBitstampUserTransactions(limit, offset, sort == null ? null : sort.toString()); return BitstampAdapters.adaptFundingHistory(Arrays.asList(txs)); } }
public CoinfloorUserTransaction[] getUserTransactions( CurrencyPair pair, Integer numberOfTransactions, Long offset, TradeHistoryParamsSorted.Order sort) throws IOException { try { return coinfloor.getUserTransactions( normalise(pair.base), normalise(pair.counter), numberOfTransactions, offset, sort == null ? null : sort.toString()); } catch (HttpStatusIOException e) { if (e.getHttpStatusCode() == HttpURLConnection.HTTP_BAD_REQUEST) { throw new ExchangeException(e.getHttpBody(), e); } else { throw e; } } }
/** Required parameter types: {@link TradeHistoryParamPaging#getPageLength()} */ @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Long limit = null; CurrencyPair currencyPair = null; Long offset = null; TradeHistoryParamsSorted.Order sort = null; if (params instanceof TradeHistoryParamPaging) { limit = Long.valueOf(((TradeHistoryParamPaging) params).getPageLength()); } if (params instanceof TradeHistoryParamCurrencyPair) { currencyPair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); } if (params instanceof TradeHistoryParamOffset) { offset = ((TradeHistoryParamOffset) params).getOffset(); } if (params instanceof TradeHistoryParamsSorted) { sort = ((TradeHistoryParamsSorted) params).getOrder(); } BitstampUserTransaction[] txs = getBitstampUserTransactions( limit, currencyPair, offset, sort == null ? null : sort.toString()); return BitstampAdapters.adaptTradeHistory(txs); }
public Map<Long, DSXTransHistoryResult> getTransHistory(DSXTransHistoryParams params) throws ExchangeException, IOException { Integer count = params.getLimit(); Long startId = nullSafeToLong(params.getStartId()); Long endId = nullSafeToLong(params.getEndId()); Long startTime = nullSafeUnixTime(params.getStartTime()); Long endTime = nullSafeUnixTime(params.getEndTime()); DSXAuthenticatedV2.SortOrder sort = params.getOrder().equals(TradeHistoryParamsSorted.Order.desc) ? DSXAuthenticatedV2.SortOrder.DESC : DSXAuthenticatedV2.SortOrder.ASC; DSXTransHistoryResult.Status status = params.getStatus(); DSXTransHistoryResult.Type type = params.getType(); Currency c = params.getCurrency(); String currency = c == null ? null : c.getCurrencyCode(); return getDSXTransHistory( count, startId, endId, sort, startTime, endTime, type, status, currency); } }