Search in sources :

Example 1 with KrakenAssetPairs

use of org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs in project XChange by knowm.

the class KrakenExchangeSymbolsDemo method raw.

private static void raw(Exchange krakenExchange) throws IOException {
    // Interested in the public market data feed (no authentication)
    KrakenMarketDataServiceRaw krakenMarketDataService = (KrakenMarketDataServiceRaw) krakenExchange.getMarketDataService();
    KrakenAssetPairs krakenAssetPairs = krakenMarketDataService.getKrakenAssetPairs();
    for (Entry<String, KrakenAssetPair> assetPairEntry : krakenAssetPairs.getAssetPairMap().entrySet()) {
        System.out.println(assetPairEntry.getKey() + ": " + assetPairEntry.getValue());
    }
}
Also used : KrakenAssetPair(org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPair) KrakenMarketDataServiceRaw(org.knowm.xchange.kraken.service.KrakenMarketDataServiceRaw) KrakenAssetPairs(org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs)

Example 2 with KrakenAssetPairs

use of org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs 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());
}
Also used : KrakenMarketDataServiceRaw(org.knowm.xchange.kraken.service.KrakenMarketDataServiceRaw) KrakenAssetPairs(org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs) KrakenAssets(org.knowm.xchange.kraken.dto.marketdata.KrakenAssets)

Aggregations

KrakenAssetPairs (org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPairs)2 KrakenMarketDataServiceRaw (org.knowm.xchange.kraken.service.KrakenMarketDataServiceRaw)2 KrakenAssetPair (org.knowm.xchange.kraken.dto.marketdata.KrakenAssetPair)1 KrakenAssets (org.knowm.xchange.kraken.dto.marketdata.KrakenAssets)1