
org.knowm.xchange.examples.coindirect.CoindirectDemoUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-examples Show documentation
Show all versions of xchange-examples Show documentation
Provides a set of examples that demonstrate how to use XChange in client applications
The newest version!
package org.knowm.xchange.examples.coindirect;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeFactory;
import org.knowm.xchange.coindirect.CoindirectExchange;
public class CoindirectDemoUtils {
public static Exchange createExchange() {
Exchange exchange;
String apiKey = null; /* Set your keys here */
String apiSecret = null;
if (apiKey != null && apiSecret != null) {
exchange =
ExchangeFactory.INSTANCE.createExchange(CoindirectExchange.class, apiKey, apiSecret);
} else {
exchange = ExchangeFactory.INSTANCE.createExchange(CoindirectExchange.class);
}
/** substitute this with an exchange with your credentials to test authenticated services */
return exchange;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy