Search in sources :

Example 16 with Exchange

use of org.knowm.xchange.Exchange in project XChange by knowm.

the class ItBitTradesDemo method main.

public static void main(String[] args) throws IOException {
    Exchange xchange = ExchangeFactory.INSTANCE.createExchange(ItBitExchange.class);
    MarketDataService marketDataService = xchange.getMarketDataService();
    generic(marketDataService);
}
Also used : ItBitExchange(org.knowm.xchange.itbit.ItBitExchange) Exchange(org.knowm.xchange.Exchange) MarketDataService(org.knowm.xchange.service.marketdata.MarketDataService)

Example 17 with Exchange

use of org.knowm.xchange.Exchange in project XChange by knowm.

the class KoineksTickerDemo method main.

public static void main(String[] args) throws IOException {
    // Use the factory to get Koineks exchange API using default settings
    Exchange koineks = KoineksDemoUtils.createExchange();
    // Interested in the public market data feed (no authentication)
    MarketDataService marketDataService = koineks.getMarketDataService();
    generic(marketDataService);
    raw((KoineksMarketDataService) marketDataService);
}
Also used : Exchange(org.knowm.xchange.Exchange) KoineksMarketDataService(org.knowm.xchange.koineks.service.KoineksMarketDataService) MarketDataService(org.knowm.xchange.service.marketdata.MarketDataService)

Example 18 with Exchange

use of org.knowm.xchange.Exchange in project XChange by knowm.

the class KoinimTickerDemo method main.

public static void main(String[] args) throws IOException {
    // Use the factory to get Koinim exchange API using default settings
    Exchange koinim = KoinimDemoUtils.createExchange();
    // Interested in the public market data feed (no authentication)
    MarketDataService marketDataService = koinim.getMarketDataService();
    generic(marketDataService);
    raw((KoinimMarketDataService) marketDataService);
}
Also used : Exchange(org.knowm.xchange.Exchange) MarketDataService(org.knowm.xchange.service.marketdata.MarketDataService) KoinimMarketDataService(org.knowm.xchange.koinim.service.KoinimMarketDataService)

Example 19 with Exchange

use of org.knowm.xchange.Exchange in project XChange by knowm.

the class KrakenExampleUtils method createTestExchange.

public static Exchange createTestExchange() {
    Exchange krakenExchange = ExchangeFactory.INSTANCE.createExchange(KrakenExchange.class);
    krakenExchange.getExchangeSpecification().setApiKey("API Key");
    krakenExchange.getExchangeSpecification().setSecretKey("Secret==");
    krakenExchange.getExchangeSpecification().setUserName("user");
    krakenExchange.applySpecification(krakenExchange.getExchangeSpecification());
    return krakenExchange;
}
Also used : KrakenExchange(org.knowm.xchange.kraken.KrakenExchange) Exchange(org.knowm.xchange.Exchange)

Example 20 with Exchange

use of org.knowm.xchange.Exchange in project XChange by knowm.

the class KrakenLimitOrderDemo method main.

public static void main(String[] args) throws IOException {
    Exchange krakenExchange = KrakenExampleUtils.createTestExchange();
    generic(krakenExchange);
    raw(krakenExchange);
}
Also used : Exchange(org.knowm.xchange.Exchange)

Aggregations

Exchange (org.knowm.xchange.Exchange)416 MarketDataService (org.knowm.xchange.service.marketdata.MarketDataService)155 Test (org.junit.Test)120 ExchangeSpecification (org.knowm.xchange.ExchangeSpecification)93 CurrencyPair (org.knowm.xchange.currency.CurrencyPair)64 TradeService (org.knowm.xchange.service.trade.TradeService)62 Ticker (org.knowm.xchange.dto.marketdata.Ticker)50 AccountService (org.knowm.xchange.service.account.AccountService)38 OrderBook (org.knowm.xchange.dto.marketdata.OrderBook)31 IOException (java.io.IOException)28 LimitOrder (org.knowm.xchange.dto.trade.LimitOrder)27 BigDecimal (java.math.BigDecimal)25 Trades (org.knowm.xchange.dto.marketdata.Trades)22 CoinsuperExchange (org.knowm.xchange.coinsuper.CoinsuperExchange)15 KrakenExchange (org.knowm.xchange.kraken.KrakenExchange)15 OpenOrders (org.knowm.xchange.dto.trade.OpenOrders)12 MercadoBitcoinExchange (org.knowm.xchange.mercadobitcoin.MercadoBitcoinExchange)12 CoinmateExchange (org.knowm.xchange.coinmate.CoinmateExchange)10 UserTrades (org.knowm.xchange.dto.trade.UserTrades)10 ArrayList (java.util.ArrayList)9