public class CurrencyAPIAdaptor extends PublicRetrofitAPIImpl<CurrencyAPIRetrofit> implements CurrencyAPI
apiKey, apiKeyVersion, baseUrl, passPhrase, secret| 构造器和说明 |
|---|
CurrencyAPIAdaptor(String baseUrl) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<CurrencyResponse> |
getCurrencies()
List known currencies.
|
List<CurrencyDetailV2Response> |
getCurrenciesV3()
List known currencies detail.
|
CurrencyDetailResponse |
getCurrencyDetail(String currency,
String chain)
Get single currency detail
|
CurrencyDetailV2Response |
getCurrencyDetailV2(String currency,
String chain)
Get single currency detail.return all chain if chain is null.
|
Map<String,BigDecimal> |
getFiatPrice(String base,
String currencies)
Get fiat price for currency
|
getAPIImplexecuteSync, getApiKey, getBaseUrl, getErrorResponse, getPassPhrase, getSecret, setApiKey, setBaseUrl, setPassPhrase, setSecretpublic CurrencyAPIAdaptor(String baseUrl)
public List<CurrencyResponse> getCurrencies() throws IOException
CurrencyAPIgetCurrencies 在接口中 CurrencyAPIIOException - on socket errors.public CurrencyDetailResponse getCurrencyDetail(String currency, String chain) throws IOException
CurrencyAPIgetCurrencyDetail 在接口中 CurrencyAPIcurrency - the code of the currencychain - the name of the chainIOException - on socket errors.public CurrencyDetailV2Response getCurrencyDetailV2(String currency, String chain) throws IOException
CurrencyAPIgetCurrencyDetailV2 在接口中 CurrencyAPIcurrency - the code of the currencychain - the name of the chainIOException - on socket errors.public List<CurrencyDetailV2Response> getCurrenciesV3() throws IOException
CurrencyAPIgetCurrenciesV3 在接口中 CurrencyAPIIOException - on socket errors.public Map<String,BigDecimal> getFiatPrice(String base, String currencies) throws IOException
CurrencyAPIgetFiatPrice 在接口中 CurrencyAPIbase - [optional] Fiat,eg.USD,EUR, default is USDcurrencies - [optional] Cryptocurrencies.For multiple cyrptocurrencies, please separate them with comma one by one. default is allIOException - on socket errors.Copyright © 2023. All rights reserved.