Examples of CryptoTradePublicTrades


Examples of com.xeiam.xchange.cryptotrade.dto.marketdata.CryptoTradePublicTrades

    // Read in the JSON from the example resources
    InputStream is = CryptoTradeMarketDataJsonTest.class.getResourceAsStream("/marketdata/example-trades-data.json");

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

    Trades trades = CryptoTradeAdapters.adaptPublicTradeHistory(CurrencyPair.BTC_USD, publicTradeHistory.getPublicTrades());

    assertThat(trades.getlastID()).isEqualTo(399394);

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

Examples of com.xeiam.xchange.cryptotrade.dto.marketdata.CryptoTradePublicTrades

    return handleResponse(cryptoTradeDepth);
  }

  public List<CryptoTradePublicTrade> getCryptoTradeTradeHistory(CurrencyPair currencyPair) throws CryptoTradeException, IOException {

    CryptoTradePublicTrades cryptoTradeDepth = cryptoTradeProxy.getTradeHistory(currencyPair.baseSymbol.toLowerCase(), currencyPair.counterSymbol.toLowerCase());

    return handleResponse(cryptoTradeDepth).getPublicTrades();
  }
View Full Code Here

Examples of com.xeiam.xchange.cryptotrade.dto.marketdata.CryptoTradePublicTrades

    return handleResponse(cryptoTradeDepth).getPublicTrades();
  }

  public List<CryptoTradePublicTrade> getCryptoTradeTradeHistory(CurrencyPair currencyPair, long sinceTimestamp) throws CryptoTradeException, IOException {

    CryptoTradePublicTrades cryptoTradeDepth = cryptoTradeProxy.getTradeHistory(currencyPair.baseSymbol.toLowerCase(), currencyPair.counterSymbol.toLowerCase(), sinceTimestamp);

    return handleResponse(cryptoTradeDepth).getPublicTrades();
  }
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.