Examples of BTERTradeHistory


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

    return handleResponse(bterDepth);
  }

  public BTERTradeHistory getBTERTradeHistory(String tradeableIdentifier, String currency) throws IOException {

    BTERTradeHistory tradeHistory = bter.getTradeHistory(tradeableIdentifier, currency);

    return handleResponse(tradeHistory);
  }
View Full Code Here

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

    return handleResponse(tradeHistory);
  }

  public BTERTradeHistory getBTERTradeHistorySince(String tradeableIdentifier, String currency, String tradeId) throws IOException {

    BTERTradeHistory tradeHistory = bter.getTradeHistorySince(tradeableIdentifier, currency, tradeId);

    return handleResponse(tradeHistory);
  }
View Full Code Here

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

  }

  @Override
  public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException {

    BTERTradeHistory tradeHistory =
        (args != null && args.length > 0 && args[0] != null && args[0] instanceof String) ? super.getBTERTradeHistorySince(currencyPair.baseSymbol, currencyPair.counterSymbol, (String) args[0])
            : super.getBTERTradeHistory(currencyPair.baseSymbol, currencyPair.counterSymbol);

    return BTERAdapters.adaptTrades(tradeHistory, currencyPair);
  }
View Full Code Here

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

    InputStream is = BTERAdapterTest.class.getResourceAsStream("/marketdata/example-trades-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    BTERTradeHistory tradeHistory = mapper.readValue(is, BTERTradeHistory.class);

    Trades adaptedTrades = BTERAdapters.adaptTrades(tradeHistory, CurrencyPair.BTC_CNY);

    List<Trade> tradeList = adaptedTrades.getTrades();
    assertThat(tradeList).hasSize(2);
View Full Code Here

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

    System.out.println(ticker);

    BTERDepth depth = marketDataService.getBTEROrderBook(Currencies.BTC, Currencies.CNY);
    System.out.println(depth);

    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
Copyright © 2018 www.massapi.com. 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.