Package com.xeiam.xchange

Examples of com.xeiam.xchange.Exchange


    String username = args[0];
    String password = args[1];
    String ipAddress = args[2];

    Exchange coinsetter = CoinsetterExamplesUtils.getExchange();
    CoinsetterClientSessionServiceRaw clientSessionService = new CoinsetterClientSessionServiceRaw(coinsetter.getExchangeSpecification());
    CoinsetterClientSession clientSession = clientSessionService.login(username, password, ipAddress);
    log.info("Client session: {}", clientSession);

    for (int i = 0; i < 2; i++) {
      TimeUnit.SECONDS.sleep(30);
View Full Code Here


    String username = args[0];
    String password = args[1];
    String ipAddress = args[2];

    Exchange coinsetter = CoinsetterExamplesUtils.getExchange(username, password, ipAddress);
    PollingAccountService accountService = coinsetter.getPollingAccountService();

    AccountInfo accountInfo = accountService.getAccountInfo();
    log.info("account info: {}", accountInfo);

    ((CoinsetterAccountService) accountService).logout();
View Full Code Here

    if (customerUuid != null) {
      configuration.addEvent("orders room", customerUuid);
    }

    final Exchange coinsetter = ExchangeFactory.INSTANCE.createExchange(CoinsetterExchange.class.getName());
    final StreamingExchangeService service = coinsetter.getStreamingExchangeService(configuration);

    final Thread consumer = new Thread("consumer") {

      @Override
      public void run() {
View Full Code Here

    String username = args[0];
    String password = args[1];
    String ipAddress = args[2];

    Exchange coinsetter = CoinsetterExamplesUtils.getExchange();
    CoinsetterClientSessionServiceRaw clientSessionService = new CoinsetterClientSessionServiceRaw(coinsetter.getExchangeSpecification());
    CoinsetterAccountServiceRaw accountService = new CoinsetterAccountServiceRaw(coinsetter.getExchangeSpecification());

    CoinsetterClientSession clientSession = clientSessionService.login(username, password, ipAddress);
    log.info("Client session: {}", clientSession);

    CoinsetterAccountList coinsetterAccounts = accountService.list(clientSession.getUuid());
View Full Code Here

    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 BTERMarketDataDemo {

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

    Exchange exchange = ExchangeFactory.INSTANCE.createExchange(BTERExchange.class.getName());
    PollingMarketDataService marketDataService = exchange.getPollingMarketDataService();

    generic(marketDataService);
    raw((BTERPollingMarketDataServiceRaw) marketDataService);
  }
View Full Code Here

  private static final Logger log = LoggerFactory.getLogger(CoinsetterMarketDataDemo.class);

  public static void main(String[] args) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException {

    Exchange coinsetter = ExchangeFactory.INSTANCE.createExchange(CoinsetterExchange.class.getName());
    generic(coinsetter);
    raw(coinsetter);
  }
View Full Code Here

public class CampBXMarketDataDemo {

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

    // Use the factory to get CampBX exchange API using default settings
    Exchange campBXExchange = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName());
    generic(campBXExchange);
    raw(campBXExchange);
  }
View Full Code Here

*/
public class MarketOrderDemo {

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

    Exchange anx = ANXExamplesUtils.createExchange();

    // Interested in the private trading functionality (authentication)
    PollingTradeService tradeService = anx.getPollingTradeService();

    // place a market order for 1 Bitcoin at market price
    OrderType orderType = (OrderType.ASK);
    BigDecimal tradeableAmount = new BigDecimal("0.01");

View Full Code Here

*/
public class TradesDemo {

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

    Exchange anx = ANXExamplesUtils.createExchange();

    // Interested in the private trading functionality (authentication)
    PollingTradeService tradeService = anx.getPollingTradeService();

    Trades trades = tradeService.getTradeHistory();
    for (Trade trade : trades.getTrades()) {
      System.out.println(trade);
    }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.Exchange

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.