use of org.knowm.xchange.coinmarketcap.deprecated.v2.dto.marketdata.CoinMarketCapCurrency in project XChange by knowm.
the class CoinMarketCapMarketDataService method getCurrencies.
public List<Currency> getCurrencies() {
List<Currency> currencies = new ArrayList<>();
List<CoinMarketCapCurrency> cmcCurrencies = getCoinMarketCapCurrencies();
for (CoinMarketCapCurrency cmcCurrency : cmcCurrencies) {
currencies.add(cmcCurrency.getCurrency());
}
return currencies;
}
use of org.knowm.xchange.coinmarketcap.deprecated.v2.dto.marketdata.CoinMarketCapCurrency in project XChange by knowm.
the class CoinMarketCapMarketDataService method getCoinMarketCapCurrencies.
@Override
public List<CoinMarketCapCurrency> getCoinMarketCapCurrencies() {
Collection<CoinMarketCapTicker> tickers = this.tickers.values();
List<CoinMarketCapCurrency> currencies = new ArrayList<>();
for (CoinMarketCapTicker ticker : tickers) currencies.add(ticker.getBaseCurrency());
return currencies;
}
use of org.knowm.xchange.coinmarketcap.deprecated.v2.dto.marketdata.CoinMarketCapCurrency in project XChange by knowm.
the class CoinMarketCapMarketDataServiceRaw method getCoinMarketCapCurrencies.
/**
* Unauthenticated resource that returns currencies supported on CoinMarketCap.
*
* @return A list of currency names and their corresponding ISO code.
* @throws IOException
*/
public List<CoinMarketCapCurrency> getCoinMarketCapCurrencies() throws IOException {
List<CoinMarketCapTicker> tickers = getCoinMarketCapTickers();
List<CoinMarketCapCurrency> currencies = new ArrayList<>();
for (CoinMarketCapTicker ticker : tickers) currencies.add(ticker.getBaseCurrency());
return currencies;
}
Aggregations