com.xeiam.xchange.examples.mexbt.MeXBTDemoUtils 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 com.xeiam.xchange.examples.mexbt;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.ExchangeFactory;
import com.xeiam.xchange.ExchangeSpecification;
import com.xeiam.xchange.mexbt.MeXBTExchange;
public class MeXBTDemoUtils {
public static Exchange createExchange(String[] args) {
String username = args[0], publicKey = args[1], privateKey = args[2];
Exchange exchange = MeXBTDemoUtils.createExchange(username, publicKey, privateKey);
return exchange;
}
public static Exchange createExchange(String username, String publicKey, String privateKey) {
ExchangeSpecification exSpec = new MeXBTExchange().getDefaultExchangeSpecification();
exSpec.setExchangeSpecificParametersItem(MeXBTExchange.PRIVATE_API_URI_KEY, "https://private-api-sandbox.mexbt.com");
exSpec.setUserName(username);
exSpec.setApiKey(publicKey);
exSpec.setSecretKey(privateKey);
return ExchangeFactory.INSTANCE.createExchange(exSpec);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy