Package com.xeiam.xchange

Examples of com.xeiam.xchange.ExchangeSpecification


  }

  public static Exchange getExchange(String username, String password, String ipAddress) {

    Exchange coinsetter = ExchangeFactory.INSTANCE.createExchange(CoinsetterExchange.class.getName());
    ExchangeSpecification exchangeSpecification = coinsetter.getExchangeSpecification();
    exchangeSpecification.setSslUri("https://staging-api.coinsetter.com/v1");
    exchangeSpecification.setHost("staging-api.coinsetter.com");

    if (username != null) {
      exchangeSpecification.setUserName(username);
    }
    if (password != null) {
      exchangeSpecification.setPassword(password);
    }
    if (ipAddress != null) {
      exchangeSpecification.setExchangeSpecificParametersItem(SESSION_IP_ADDRESS_KEY, ipAddress);
    }

    return ExchangeFactory.INSTANCE.createExchange(exchangeSpecification);
  }
View Full Code Here


*/
public class BitcoiniumOrderBookChartDemo {

  public static void main(String[] args) throws Exception {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(BitcoiniumExchange.class.getName());
    // exchangeSpecification.setPlainTextUri("http://openexchangerates.org");
    exchangeSpecification.setApiKey("42djci5kmbtyzrvglfdw3e2dgmh5mr37");
    exchangeSpecification.setPlainTextUri("http://173.10.241.154:9090");
    System.out.println(exchangeSpecification.toString());
    Exchange bitcoiniumExchange = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification);

    // Interested in the public polling market data feed (no authentication)
    BitcoiniumMarketDataServiceRaw bitcoiniumMarketDataService = (BitcoiniumMarketDataServiceRaw) bitcoiniumExchange.getPollingMarketDataService();

View Full Code Here

*/
public class BitcoiniumMarketDataDemo {

  public static void main(String[] args) throws Exception {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(BitcoiniumExchange.class.getName());
    // exchangeSpecification.setPlainTextUri("http://openexchangerates.org");
    exchangeSpecification.setApiKey("42djci5kmbtyzrvglfdw3e2dgmh5mr37");
    exchangeSpecification.setPlainTextUri("http://173.10.241.154:9090");
    System.out.println(exchangeSpecification.toString());
    Exchange bitcoiniumExchange = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification);

    generic(bitcoiniumExchange);
    raw(bitcoiniumExchange);
  }
View Full Code Here

*/
public class ANXExamplesUtils {

  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(ANXExchange.class);

    exSpec.setApiKey("");
    exSpec.setSecretKey("");

    return ExchangeFactory.INSTANCE.createExchange(exSpec);
  }
View Full Code Here

*/
public class CoinbaseDemoUtils {

  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new CoinbaseExchange().getDefaultExchangeSpecification();
    exSpec.setApiKey("");
    exSpec.setSecretKey("");
    return ExchangeFactory.INSTANCE.createExchange(exSpec);
  }
View Full Code Here

  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;
  }
View Full Code Here

public class CryptonitExampleUtils {

  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(CryptonitExchange.class);
    exSpec.setSecretKey("");
    exSpec.setApiKey("");

    return ExchangeFactory.INSTANCE.createExchange(exSpec);
  }
View Full Code Here

public class JustcoinDemoUtils {

  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(JustcoinExchange.class);

    // API key needed for access rights to specific API calls
    exSpec.setApiKey("");

    // User and password needed for session authentication
    exSpec.setUserName("");
    exSpec.setPassword("");

    return ExchangeFactory.INSTANCE.createExchange(exSpec);
  }
View Full Code Here

  }

  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName());
    exchangeSpecification.setPlainTextUri("http://api.bitcoincharts.com");
    exchangeSpecification.setHost("api.bitcoincharts.com");
    exchangeSpecification.setPort(80);
    exchangeSpecification.setExchangeName("Bitcoin Charts");
    exchangeSpecification.setExchangeDescription("Bitcoin charts provides financial and technical data related to the Bitcoin network.");

    return exchangeSpecification;
  }
View Full Code Here

  }

  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName());
    exchangeSpecification.setSslUri("https://api.bitcoinaverage.com");
    exchangeSpecification.setHost("bitcoinaverage.com");
    exchangeSpecification.setPort(80);
    exchangeSpecification.setExchangeName("BitcoinAverage");
    exchangeSpecification.setExchangeDescription("BitcoinAverage provides a more accurate price of bitcoin using weighted average for multiple exchanges.");

    return exchangeSpecification;
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.ExchangeSpecification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.