Search in sources :

Example 1 with DefaultTradeHistoryParamPaging

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);
}
Also used : UserTrades(org.knowm.xchange.dto.trade.UserTrades) DefaultTradeHistoryParamPaging(org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)

Example 2 with DefaultTradeHistoryParamPaging

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);
}
Also used : UserTrades(org.knowm.xchange.dto.trade.UserTrades) DefaultTradeHistoryParamPaging(org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)

Example 3 with DefaultTradeHistoryParamPaging

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;
}
Also used : DefaultTradeHistoryParamPaging(org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)

Example 4 with DefaultTradeHistoryParamPaging

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);
}
Also used : Trades(org.knowm.xchange.dto.marketdata.Trades) DefaultTradeHistoryParamPaging(org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)

Example 5 with DefaultTradeHistoryParamPaging

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);
}
Also used : Trades(org.knowm.xchange.dto.marketdata.Trades) DefaultTradeHistoryParamPaging(org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)

Aggregations

DefaultTradeHistoryParamPaging (org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging)6 Trades (org.knowm.xchange.dto.marketdata.Trades)3 UserTrades (org.knowm.xchange.dto.trade.UserTrades)2