use of org.knowm.xchange.Exchange in project XChange by knowm.
the class OkCoinTradesDemo method main.
public static void main(String[] args) throws IOException {
ExchangeSpecification exSpec = new ExchangeSpecification(OkCoinExchange.class);
exSpec.setSecretKey("x");
exSpec.setApiKey("x");
// flag to set Use_Intl (USD) or China (default)
exSpec.setExchangeSpecificParametersItem("Use_Intl", true);
exSpec.setExchangeSpecificParametersItem("Use_Futures", false);
exSpec.setExchangeSpecificParametersItem("Futures_Contract", FuturesContract.ThisWeek);
Exchange okcoinExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
// futures(okcoinExchange);
generic(okcoinExchange);
raw(okcoinExchange);
}
use of org.knowm.xchange.Exchange in project XChange by knowm.
the class OkexTradesDemo method main.
public static void main(String[] args) throws IOException {
ExchangeSpecification exSpec = new ExchangeSpecification(OkexExchange.class);
Exchange okexExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
generic(okexExchange);
}
use of org.knowm.xchange.Exchange in project XChange by knowm.
the class OkexOrdersDemo method main.
public static void main(String[] args) throws IOException {
ExchangeSpecification exSpec = new ExchangeSpecification(OkexExchange.class);
exSpec.setSecretKey("");
exSpec.setApiKey("");
exSpec.setExchangeSpecificParametersItem("passphrase", "");
Exchange okexExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
generic(okexExchange);
}
use of org.knowm.xchange.Exchange in project XChange by knowm.
the class MercadoBitcoinTradeDemo method main.
public static void main(String[] args) throws IOException, InterruptedException {
Exchange mercadoBitcoin = InteractiveAuthenticatedExchange.createInstanceFromDefaultInput();
TradeService tradeService = mercadoBitcoin.getTradeService();
generic(tradeService);
raw((MercadoBitcoinTradeServiceRaw) tradeService);
}
use of org.knowm.xchange.Exchange in project XChange by knowm.
the class KrakenTradesDemo 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);
}
Aggregations