use of org.knowm.xchange.okcoin.OkCoinExchange 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.okcoin.OkCoinExchange in project XChange by knowm.
the class OkCoinExampleUtils method createTestExchange.
public static Exchange createTestExchange() {
Exchange okcoinExchange = ExchangeFactory.INSTANCE.createExchange(OkCoinExchange.class);
okcoinExchange.getExchangeSpecification().setApiKey("");
okcoinExchange.getExchangeSpecification().setSecretKey("");
okcoinExchange.getExchangeSpecification().setUserName("");
okcoinExchange.applySpecification(okcoinExchange.getExchangeSpecification());
return okcoinExchange;
}
use of org.knowm.xchange.okcoin.OkCoinExchange in project XChange by knowm.
the class OkCoinCurrencyPairsDemo method main.
public static void main(String[] args) throws IOException {
ExchangeSpecification exSpec = new ExchangeSpecification(OkCoinExchange.class);
// flag to set Use_Intl (USD) or China (default)
exSpec.setExchangeSpecificParametersItem("Use_Intl", true);
Exchange okcoinExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
generic(okcoinExchange);
}
use of org.knowm.xchange.okcoin.OkCoinExchange in project XChange by knowm.
the class OkCoinDepthDemo method main.
public static void main(String[] args) throws IOException {
ExchangeSpecification exSpec = new ExchangeSpecification(OkCoinExchange.class);
// flag to set Use_Intl (USD) or China (default)
exSpec.setExchangeSpecificParametersItem("Use_Intl", true);
Exchange okcoinExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
generic(okcoinExchange);
raw(okcoinExchange);
}
Aggregations