All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.examples.coindirect.CoindirectDemoUtils Maven / Gradle / Ivy

Go to download

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