Examples of ExchangeSpecification


Examples of com.xeiam.xchange.ExchangeSpecification

   * {@inheritDoc}
   */
  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(getClass());
    exchangeSpecification.setSslUri("https://www.btctrade.com/api");
    exchangeSpecification.setHost("www.btctrade.com");
    exchangeSpecification.setExchangeName("BTCTrade");
    return exchangeSpecification;
  }
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

public class TickerDemo {

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

    // Use the factory to get the Open Exchange Rates exchange API
    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(OERExchange.class.getName());
    exchangeSpecification.setPlainTextUri("http://openexchangerates.org");
    exchangeSpecification.setApiKey("ab32c922bca749ec9345b4717914ee1f");

    Exchange openExchangeRates = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification);
    generic(openExchangeRates);
    raw(openExchangeRates);
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

*/
public class BitcoiniumTickerHistoryDemo {

  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

Examples of com.xeiam.xchange.ExchangeSpecification

  public static BlockingQueue<CoinfloorExchangeEvent> secondaryQueue = new LinkedBlockingQueue<CoinfloorExchangeEvent>();

  public static void main(String[] args) throws InterruptedException, ExecutionException {

    ExchangeSpecification exSpec = new ExchangeSpecification(CoinfloorExchange.class);
    exSpec.setUserName("163");
    exSpec.setExchangeSpecificParametersItem("cookie", "X1UC55QE4WXNZMKfP4FfCsxKVfw=");
    exSpec.setPassword("2QvxAyUvPTIX8mrCvH");
    exSpec.setPlainTextUriStreaming("ws://api.coinfloor.co.uk");
    exSpec.setSslUriStreaming("wss://api.coinfloor.co.uk");
    exSpec.setHost("coinfloor.co.uk");
    exSpec.setPort(80);

    Exchange coinfloorExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);

    // Streaming exchange service can be instantiated in one of two ways:
    // //Using default vars (commented out to prevent conflicts for this demo)
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

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

    Exchange campbx = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName());

    ExchangeSpecification exSpec = campbx.getExchangeSpecification();
    exSpec.setUserName("XChange");
    exSpec.setPassword("The Java API");

    PollingTradeService tradeService = campbx.getPollingTradeService();

    printOpenOrders(tradeService);
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

*/
public class BTCChinaExamplesUtils {

  public static Exchange getExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(BTCChinaExchange.class);
    exSpec.setSecretKey("dea20500-3a2f-4038-ace1-8e9bd244e56c");
    exSpec.setApiKey("9dfa65ee-e023-48fb-a8c1-cba6ea4b01ff");

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

Examples of com.xeiam.xchange.ExchangeSpecification

    bitcoiniumRealtimeTickerDemo.go();
  }

  private void go() throws IOException {

    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)
    bitcoiniumMarketDataService = (BitcoiniumMarketDataServiceRaw) bitcoiniumExchange.getPollingMarketDataService();
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

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

    // Use the factory to get BTC-E exchange API using default settings
    Exchange bitfinex = ExchangeFactory.INSTANCE.createExchange(ItBitExchange.class.getName());
    ExchangeSpecification defaultExchangeSpecification = bitfinex.getDefaultExchangeSpecification();

    defaultExchangeSpecification.setUserName("xxx");
    defaultExchangeSpecification.setApiKey("xxx");
    defaultExchangeSpecification.setSecretKey("xxx");

    defaultExchangeSpecification.setExchangeSpecificParametersItem("walletId", "xx");
    defaultExchangeSpecification.setExchangeSpecificParametersItem("userId", "xxx");

    bitfinex.applySpecification(defaultExchangeSpecification);

    // get all services
    PollingMarketDataService marketDataService = bitfinex.getPollingMarketDataService();
View Full Code Here

Examples of com.xeiam.xchange.ExchangeSpecification

*/
public class MintPalDemoUtils {

  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(MintPalExchange.class);

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

Examples of com.xeiam.xchange.ExchangeSpecification

  /**
   * @return
   */
  public static Exchange createExchange() {

    ExchangeSpecification exSpec = new ExchangeSpecification(CoinfloorExchange.class);
    exSpec.setPlainTextUriStreaming("ws://api.coinfloor.co.uk");

    return ExchangeFactory.INSTANCE.createExchange(exSpec);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.