Search in sources :

Example 1 with ReturnTickerRequestedWithNull

use of org.knowm.xchange.idex.dto.ReturnTickerRequestedWithNull in project XChange by knowm.

the class IdexExchange method getExchangeMetaData.

@Override
public final ExchangeMetaData getExchangeMetaData() {
    ReturnCurrenciesResponse allCurrenciesStatic = null;
    try {
        allCurrenciesStatic = allCurrenciesStatic();
    } catch (IOException e) {
        e.printStackTrace();
    }
    LinkedHashMap<CurrencyPair, CurrencyPairMetaData> currencyPairs = new LinkedHashMap<>();
    ReturnTickerRequestedWithNull allTickers = IdexMarketDataService.Companion.allTickers;
    allTickers.keySet().forEach(s -> currencyPairs.put(IdexExchange.Companion.getCurrencyPair(s), unavailableCPMeta));
    LinkedHashMap<Currency, CurrencyMetaData> linkedHashMap = new LinkedHashMap<>();
    allCurrenciesStatic.forEach((key, value) -> linkedHashMap.put(Currency.getInstance(key), new IdexCurrencyMeta(0, ZERO, value.getAddress(), value.getName(), value.getDecimals())));
    RateLimit[] publicRateLimits = {};
    return new ExchangeMetaData(currencyPairs, linkedHashMap, publicRateLimits, publicRateLimits, Boolean.FALSE);
}
Also used : CurrencyPairMetaData(org.knowm.xchange.dto.meta.CurrencyPairMetaData) CurrencyMetaData(org.knowm.xchange.dto.meta.CurrencyMetaData) IdexCurrencyMeta(org.knowm.xchange.idex.IdexExchange.Companion.IdexCurrencyMeta) ReturnCurrenciesResponse(org.knowm.xchange.idex.dto.ReturnCurrenciesResponse) IOException(java.io.IOException) ReturnTickerRequestedWithNull(org.knowm.xchange.idex.dto.ReturnTickerRequestedWithNull) LinkedHashMap(java.util.LinkedHashMap) RateLimit(org.knowm.xchange.dto.meta.RateLimit) ExchangeMetaData(org.knowm.xchange.dto.meta.ExchangeMetaData) Currency(org.knowm.xchange.currency.Currency) CurrencyPair(org.knowm.xchange.currency.CurrencyPair)

Aggregations

IOException (java.io.IOException)1 LinkedHashMap (java.util.LinkedHashMap)1 Currency (org.knowm.xchange.currency.Currency)1 CurrencyPair (org.knowm.xchange.currency.CurrencyPair)1 CurrencyMetaData (org.knowm.xchange.dto.meta.CurrencyMetaData)1 CurrencyPairMetaData (org.knowm.xchange.dto.meta.CurrencyPairMetaData)1 ExchangeMetaData (org.knowm.xchange.dto.meta.ExchangeMetaData)1 RateLimit (org.knowm.xchange.dto.meta.RateLimit)1 IdexCurrencyMeta (org.knowm.xchange.idex.IdexExchange.Companion.IdexCurrencyMeta)1 ReturnCurrenciesResponse (org.knowm.xchange.idex.dto.ReturnCurrenciesResponse)1 ReturnTickerRequestedWithNull (org.knowm.xchange.idex.dto.ReturnTickerRequestedWithNull)1