use of org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging in project XChange by knowm.
the class DsxTradingDemo method generic.
private static void generic(TradeService tradeService) throws IOException {
DefaultTradeHistoryParamPaging params = new DefaultTradeHistoryParamPaging();
UserTrades accountInfo = tradeService.getTradeHistory(params);
System.out.println(accountInfo);
}
use of org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging in project XChange by knowm.
the class HitbtcTradingDemo method generic.
private static void generic(TradeService tradeService) throws IOException {
DefaultTradeHistoryParamPaging params = new DefaultTradeHistoryParamPaging();
UserTrades accountInfo = tradeService.getTradeHistory(params);
System.out.println(accountInfo);
}
use of org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging in project XChange by knowm.
the class CoinbaseTradeService method createTradeHistoryParams.
@Override
public TradeHistoryParams createTradeHistoryParams() {
DefaultTradeHistoryParamPaging params = new DefaultTradeHistoryParamPaging();
params.setPageNumber(0);
params.setPageLength(100);
return params;
}
use of org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging in project XChange by knowm.
the class BitsoUserTradeHistoryDemo method generic.
private static void generic(TradeService tradeService) throws IOException {
Trades trades = tradeService.getTradeHistory(tradeService.createTradeHistoryParams());
System.out.println(trades);
// Warning: using a limit here can be misleading. The underlying call
// retrieves trades, withdrawals, and deposits. So the example here will
// limit the result to 17 of those types and from those 17 only trades are
// returned. It is recommended to use the raw service demonstrated below
// if you want to use this feature.
Trades tradesLimitedTo17 = tradeService.getTradeHistory(new DefaultTradeHistoryParamPaging(17));
System.out.println(tradesLimitedTo17);
}
use of org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging in project XChange by knowm.
the class CoinbaseTradeDemo method generic.
public static void generic(TradeService tradeService) throws IOException {
// MarketOrder marketOrder = new MarketOrder(OrderType.BID, new BigDecimal(".01"), Currency.BTC,
// Currency.USD);
// String orderId = tradeService.placeMarketOrder(marketOrder);
// System.out.println("Order Id: " + orderId);
// optional
int page = 1;
// optional
int limit = 3;
Trades trades = tradeService.getTradeHistory(new DefaultTradeHistoryParamPaging(page, limit));
System.out.println(trades);
}
Aggregations