use of org.knowm.xchange.kraken.dto.marketdata.KrakenAssets in project XChange by knowm.
the class KrakenExchange method remoteInit.
@Override
public void remoteInit() throws IOException {
KrakenAssetPairs assetPairs = ((KrakenMarketDataServiceRaw) marketDataService).getKrakenAssetPairs();
KrakenAssets assets = ((KrakenMarketDataServiceRaw) marketDataService).getKrakenAssets();
KrakenUtils.clearAssets();
// Note: CurrencyPair Metadata will not contain accurate maker/taker fees
// Note: Currency Metadata will only contain price scale
exchangeMetaData = KrakenAdapters.adaptToExchangeMetaData(exchangeMetaData, assetPairs.getAssetPairMap(), assets.getAssetPairMap());
}
use of org.knowm.xchange.kraken.dto.marketdata.KrakenAssets in project XChange by knowm.
the class KrakenMarketDataRawSpecificDemo method main.
public static void main(String[] args) throws IOException {
// Use the factory to get Kraken exchange API using default settings
Exchange krakenExchange = ExchangeFactory.INSTANCE.createExchange(KrakenExchange.class);
// Interested in the public market data feed (no authentication)
KrakenMarketDataServiceRaw krakenMarketDataService = (KrakenMarketDataServiceRaw) krakenExchange.getMarketDataService();
KrakenServerTime serverTime = krakenMarketDataService.getServerTime();
System.out.println(serverTime);
KrakenAssets assets = krakenMarketDataService.getKrakenAssets();
System.out.println(assets);
KrakenSpreads spreads = krakenMarketDataService.getKrakenSpreads(Currency.BTC, Currency.USD);
System.out.println(spreads);
}
Aggregations