public static Exchange createTestExchange() { Exchange exchange = ExchangeFactory.INSTANCE.createExchange(AcxExchange.class.getName()); ExchangeSpecification spec = exchange.getExchangeSpecification(); exchange.applySpecification(spec); return exchange; }
public static Exchange createExchange() { // Use the factory to get Bitmex exchange API using default settings Exchange bitmex = ExchangeFactory.INSTANCE.createExchange(BitmexExchange.class.getName()); ExchangeSpecification bitmexSpec = bitmex.getDefaultExchangeSpecification(); // bitmexSpec.setApiKey(""); // bitmexSpec.setSecretKey(""); bitmex.applySpecification(bitmexSpec); return bitmex; } }
/** * Create an Exchange object default ExchangeSpecification * * @param exchangeSpecification the exchange specification * @return a new exchange instance configured with the provided {@link * org.knowm.xchange.ExchangeSpecification} */ public Exchange createExchange(ExchangeSpecification exchangeSpecification) { Assert.notNull(exchangeSpecification, "exchangeSpecfication cannot be null"); log.debug("Creating exchange from specification"); String exchangeClassName = exchangeSpecification.getExchangeClassName(); Exchange exchange = createExchangeWithoutSpecification(exchangeClassName); exchange.applySpecification(exchangeSpecification); return exchange; }
public static Exchange getExchange() { Exchange bleutrade = ExchangeFactory.INSTANCE.createExchange(BleutradeExchange.class.getName()); ExchangeSpecification exchangeSpecification = bleutrade.getDefaultExchangeSpecification(); exchangeSpecification.setApiKey(""); exchangeSpecification.setSecretKey(""); bleutrade.applySpecification(exchangeSpecification); return bleutrade; } }
public static Exchange createExchange() { // Use the factory to get BFX exchange API using default settings Exchange bfx = ExchangeFactory.INSTANCE.createExchange(BitfinexExchange.class.getName()); ExchangeSpecification bfxSpec = bfx.getDefaultExchangeSpecification(); bfxSpec.setApiKey(""); bfxSpec.setSecretKey(""); bfx.applySpecification(bfxSpec); return bfx; } }
public static Exchange createExchange() { Exchange exchange = ExchangeFactory.INSTANCE.createExchange(BithumbExchange.class.getName()); ExchangeSpecification bithumbSpec = exchange.getDefaultExchangeSpecification(); bithumbSpec.setApiKey(""); bithumbSpec.setSecretKey(""); exchange.applySpecification(bithumbSpec); return exchange; } }
public static Exchange createExchange() { // Use the factory to get BitFlyer exchange API using default settings Exchange exchange = ExchangeFactory.INSTANCE.createExchange(BitflyerExchange.class.getName()); ExchangeSpecification bfxSpec = exchange.getDefaultExchangeSpecification(); bfxSpec.setApiKey(""); bfxSpec.setSecretKey(""); exchange.applySpecification(bfxSpec); return exchange; } }
public static Exchange createTestExchange() { Exchange btcMarketsExchange = ExchangeFactory.INSTANCE.createExchange(BTCMarketsExchange.class.getName()); ExchangeSpecification spec = btcMarketsExchange.getExchangeSpecification(); // Set your actual credentials here for the demos to work. spec.setApiKey("<Put your API key here.>"); spec.setSecretKey("<Put your secret key here.>"); btcMarketsExchange.applySpecification(spec); return btcMarketsExchange; } }
public static Exchange createTestExchange() { final Exchange liquiExchange = ExchangeFactory.INSTANCE.createExchange(LiquiExchange.class.getName()); liquiExchange.getExchangeSpecification().setApiKey(KEY); liquiExchange.getExchangeSpecification().setSecretKey(SECRET); liquiExchange.applySpecification(liquiExchange.getExchangeSpecification()); return liquiExchange; } }
/** * Create an Exchange object with default ExchangeSpecification with authentication info and API * keys provided through parameters * * <p>The factory is parameterized with the name of the exchange implementation class. This must * be a class extending {@link org.knowm.xchange.Exchange}. * * @param exchangeClass the class of the exchange * @param apiKey the public API key * @param secretKey the secret API key * @return a new exchange instance configured with the default {@link * org.knowm.xchange.ExchangeSpecification} */ public <T extends Exchange> T createExchange( Class<T> exchangeClass, String apiKey, String secretKey) { Assert.notNull(exchangeClass, "exchange cannot be null"); log.debug("Creating default exchange from class name"); T exchange = createExchangeWithoutSpecification(exchangeClass); ExchangeSpecification defaultExchangeSpecification = exchange.getDefaultExchangeSpecification(); if (apiKey != null) defaultExchangeSpecification.setApiKey(apiKey); if (secretKey != null) defaultExchangeSpecification.setSecretKey(secretKey); exchange.applySpecification(defaultExchangeSpecification); return exchange; }
public static Exchange createTestExchange() { Exchange krakenExchange = ExchangeFactory.INSTANCE.createExchange(KrakenExchange.class.getName()); krakenExchange.getExchangeSpecification().setApiKey("API Key"); krakenExchange.getExchangeSpecification().setSecretKey("Secret=="); krakenExchange.getExchangeSpecification().setUserName("user"); krakenExchange.applySpecification(krakenExchange.getExchangeSpecification()); return krakenExchange; } }
/** * Create an Exchange object with default ExchangeSpecification with authentication info and API * keys provided through parameters * * <p>The factory is parameterized with the name of the exchange implementation class. This must * be a class extending {@link org.knowm.xchange.Exchange}. * * @param exchangeClassName the fully-qualified class name of the exchange * @param apiKey the public API key * @param secretKey the secret API key * @return a new exchange instance configured with the default {@link * org.knowm.xchange.ExchangeSpecification} */ public Exchange createExchange(String exchangeClassName, String apiKey, String secretKey) { Assert.notNull(exchangeClassName, "exchangeClassName cannot be null"); log.debug("Creating default exchange from class name"); Exchange exchange = createExchangeWithoutSpecification(exchangeClassName); ExchangeSpecification defaultExchangeSpecification = exchange.getDefaultExchangeSpecification(); if (apiKey != null) defaultExchangeSpecification.setApiKey(apiKey); if (secretKey != null) defaultExchangeSpecification.setSecretKey(secretKey); exchange.applySpecification(defaultExchangeSpecification); return exchange; }
public static Exchange createTestExchange() { Exchange exchange = ExchangeFactory.INSTANCE.createExchange(TheRockExchange.class.getName()); exchange.getExchangeSpecification().setApiKey("API Key"); exchange.getExchangeSpecification().setSecretKey("Secret=="); exchange.getExchangeSpecification().setUserName("user"); exchange.applySpecification(exchange.getExchangeSpecification()); return exchange; } }
public static Exchange createTestExchange() { Exchange okcoinExchange = ExchangeFactory.INSTANCE.createExchange(OkCoinExchange.class.getName()); okcoinExchange.getExchangeSpecification().setApiKey(""); okcoinExchange.getExchangeSpecification().setSecretKey(""); okcoinExchange.getExchangeSpecification().setUserName(""); okcoinExchange.applySpecification(okcoinExchange.getExchangeSpecification()); return okcoinExchange; } }
/** * Create an Exchange object default ExchangeSpecification * * @param exchangeSpecification the exchange specification * @return a new exchange instance configured with the provided {@link * org.knowm.xchange.ExchangeSpecification} */ public Exchange createExchange(ExchangeSpecification exchangeSpecification) { Assert.notNull(exchangeSpecification, "exchangeSpecfication cannot be null"); log.debug("Creating exchange from specification"); String exchangeClassName = exchangeSpecification.getExchangeClassName(); Exchange exchange = createExchangeWithoutSpecification(exchangeClassName); exchange.applySpecification(exchangeSpecification); return exchange; }
/** * Create an Exchange object with default ExchangeSpecification with authentication info and API * keys provided through parameters * * <p>The factory is parameterized with the name of the exchange implementation class. This must * be a class extending {@link org.knowm.xchange.Exchange}. * * @param exchangeClass the class of the exchange * @param apiKey the public API key * @param secretKey the secret API key * @return a new exchange instance configured with the default {@link * org.knowm.xchange.ExchangeSpecification} */ public <T extends Exchange> T createExchange( Class<T> exchangeClass, String apiKey, String secretKey) { Assert.notNull(exchangeClass, "exchange cannot be null"); log.debug("Creating default exchange from class name"); T exchange = createExchangeWithoutSpecification(exchangeClass); ExchangeSpecification defaultExchangeSpecification = exchange.getDefaultExchangeSpecification(); if (apiKey != null) defaultExchangeSpecification.setApiKey(apiKey); if (secretKey != null) defaultExchangeSpecification.setSecretKey(secretKey); exchange.applySpecification(defaultExchangeSpecification); return exchange; }
/** * Create an Exchange object with default ExchangeSpecification with authentication info and API * keys provided through parameters * * <p>The factory is parameterized with the name of the exchange implementation class. This must * be a class extending {@link org.knowm.xchange.Exchange}. * * @param exchangeClassName the fully-qualified class name of the exchange * @param apiKey the public API key * @param secretKey the secret API key * @return a new exchange instance configured with the default {@link * org.knowm.xchange.ExchangeSpecification} */ public Exchange createExchange(String exchangeClassName, String apiKey, String secretKey) { Assert.notNull(exchangeClassName, "exchangeClassName cannot be null"); log.debug("Creating default exchange from class name"); Exchange exchange = createExchangeWithoutSpecification(exchangeClassName); ExchangeSpecification defaultExchangeSpecification = exchange.getDefaultExchangeSpecification(); if (apiKey != null) defaultExchangeSpecification.setApiKey(apiKey); if (secretKey != null) defaultExchangeSpecification.setSecretKey(secretKey); exchange.applySpecification(defaultExchangeSpecification); return exchange; }