Package com.xeiam.xchange.bter.dto.marketdata.BTERTradeHistory

Examples of com.xeiam.xchange.bter.dto.marketdata.BTERTradeHistory.BTERPublicTrade


    assertThat(tradeHistory.getElapsed()).isEqualTo("0.634ms");

    List<BTERPublicTrade> trades = tradeHistory.getTrades();
    assertThat(trades).hasSize(2);

    BTERPublicTrade trade = trades.get(0);
    assertThat(trade.getDate()).isEqualTo(1393908191);
    assertThat(trade.getPrice()).isEqualTo(new BigDecimal("3942"));
    assertThat(trade.getAmount()).isEqualTo(new BigDecimal("0.0129"));
    assertThat(trade.getTradeId()).isEqualTo("5600118");
    assertThat(trade.getType()).isEqualTo(BTEROrderType.SELL);
  }
View Full Code Here


    BTERTradeHistory tradeHistory = marketDataService.getBTERTradeHistory(Currencies.BTC, Currencies.CNY);
    System.out.println(tradeHistory);

    List<BTERPublicTrade> trades = tradeHistory.getTrades();
    if (trades.size() > 1) {
      BTERPublicTrade trade = trades.get(trades.size() - 2);
      tradeHistory = marketDataService.getBTERTradeHistorySince(Currencies.BTC, Currencies.CNY, trade.getTradeId());
      System.out.println(tradeHistory);
    }
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.bter.dto.marketdata.BTERTradeHistory.BTERPublicTrade

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.