本文整理了Java中org.knowm.xchange.currency.Currency.getIso4217Currency()
方法的一些代码示例,展示了Currency.getIso4217Currency()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Currency.getIso4217Currency()
方法的具体详情如下:
包路径:org.knowm.xchange.currency.Currency
类名称:Currency
方法名:getIso4217Currency
[英]Gets the equivalent object with an ISO 4217 code, or if none a code which looks ISO compatible (starts with an X), or the constructed currency code if neither exist.
[中]获取具有ISO 4217代码的等效对象,如果没有,则获取看起来与ISO兼容的代码(以X开头),如果两者都不存在,则获取构造的货币代码。
代码示例来源:origin: knowm/XChange
public static Currency adaptCurrencyToExchange(Currency currency) {
if (currency == Currency.BTC) {
return currency.getIso4217Currency();
}
return currency;
}
代码示例来源:origin: knowm/XChange
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;
}
代码示例来源:origin: knowm/XChange
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;
}
代码示例来源:origin: org.knowm.xchange/xchange-kraken
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;
}
代码示例来源:origin: org.knowm.xchange/xchange-bitmex
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;
}
内容来源于网络,如有侵权,请联系作者删除!