public static Currency adaptCurrencyToExchange(Currency currency) { if (currency == Currency.BTC) { return currency.getIso4217Currency(); } return currency; }
public static String getKrakenCurrencyCode(Currency currency) { if (currency.getIso4217Currency() != null) { currency = currency.getIso4217Currency(); } String krakenCode = assetsMapReverse.get(currency); if (krakenCode == null) { throw new ExchangeException("Kraken does not support the currency code " + currency); } return krakenCode; }
public static String getBitmexCurrencyCode(Currency currency) { if (currency.getIso4217Currency() != null) { currency = currency.getIso4217Currency(); } String bitmexCode = assetsMap.inverse().get(currency); if (bitmexCode == null) { throw new ExchangeException("Bitmex does not support the currency code " + currency); } return bitmexCode; }
public static String getKrakenCurrencyCode(Currency currency) { if (currency.getIso4217Currency() != null) { currency = currency.getIso4217Currency(); } String krakenCode = assetsMapReverse.get(currency); if (krakenCode == null) { throw new ExchangeException("Kraken does not support the currency code " + currency); } return krakenCode; }
public static String getBitmexCurrencyCode(Currency currency) { if (currency.getIso4217Currency() != null) { currency = currency.getIso4217Currency(); } String bitmexCode = assetsMap.inverse().get(currency); if (bitmexCode == null) { throw new ExchangeException("Bitmex does not support the currency code " + currency); } return bitmexCode; }