org.knowm.xchange.oer.OERAdapters Maven / Gradle / Ivy
package org.knowm.xchange.oer;
import java.math.BigDecimal;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.dto.marketdata.Ticker;
/** Various adapters for converting from OER DTOs to XChange DTOs */
public final class OERAdapters {
/** private Constructor */
private OERAdapters() {}
public static Ticker adaptTicker(CurrencyPair currencyPair, Double exchangeRate) {
BigDecimal last = BigDecimal.valueOf(exchangeRate);
return new Ticker.Builder().currencyPair(currencyPair).last(last).timestamp(null).build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy