Search in sources :

Example 6 with KrakenExchange

use of org.knowm.xchange.kraken.KrakenExchange in project XChange by knowm.

the class KrakenExchangeSymbolsDemo 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);
    generic(krakenExchange);
    raw(krakenExchange);
}
Also used : KrakenExchange(org.knowm.xchange.kraken.KrakenExchange) Exchange(org.knowm.xchange.Exchange)

Example 7 with KrakenExchange

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

Example 8 with KrakenExchange

use of org.knowm.xchange.kraken.KrakenExchange in project XChange by knowm.

the class KrakenTickerDemo 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);
    generic(krakenExchange);
    raw(krakenExchange);
}
Also used : KrakenExchange(org.knowm.xchange.kraken.KrakenExchange) Exchange(org.knowm.xchange.Exchange)

Aggregations

Exchange (org.knowm.xchange.Exchange)8 KrakenExchange (org.knowm.xchange.kraken.KrakenExchange)8 Test (org.junit.jupiter.api.Test)2 BitstampExchange (org.knowm.xchange.bitstamp.BitstampExchange)2 ExchangeSpecification (org.knowm.xchange.ExchangeSpecification)1 KrakenAssets (org.knowm.xchange.kraken.dto.marketdata.KrakenAssets)1 KrakenServerTime (org.knowm.xchange.kraken.dto.marketdata.KrakenServerTime)1 KrakenSpreads (org.knowm.xchange.kraken.dto.marketdata.KrakenSpreads)1 KrakenMarketDataServiceRaw (org.knowm.xchange.kraken.service.KrakenMarketDataServiceRaw)1