Package com.xeiam.xchange.service.polling

Examples of com.xeiam.xchange.service.polling.PollingAccountService


  @Test
  public void testApplySpecification() {

    assertNotNull(defaultExchange);
    PollingAccountService accountService = defaultExchange.getPollingAccountService();
    PollingMarketDataService marketDataService = defaultExchange.getPollingMarketDataService();
    PollingTradeService tradeService = defaultExchange.getPollingTradeService();
    assertNull(accountService);
    assertNull(marketDataService);
    assertNull(tradeService);
View Full Code Here


  @Test
  public void testGetPollingAccountService() {

    assertNotNull(testExchange);
    PollingAccountService pollingAccountService = testExchange.getPollingAccountService();
    assertNotNull(pollingAccountService);
    LOGGER.info(pollingAccountService.toString());
  }
View Full Code Here

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

    CertHelper.trustAllCerts();

    Exchange poloniex = PoloniexExamplesUtils.getExchange();
    PollingAccountService accountService = poloniex.getPollingAccountService();

    generic(accountService);
    raw((PoloniexAccountServiceRaw) accountService);
  }
View Full Code Here

public class AccountInfoDemo {

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

    Exchange exchange = CexIODemoUtils.createExchange();
    PollingAccountService accountService = exchange.getPollingAccountService();

    // Get the account information
    AccountInfo accountInfo = accountService.getAccountInfo();
    System.out.println("AccountInfo as String: " + accountInfo.toString());
  }
View Full Code Here

public class HitbtcAccountDemo {

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

    Exchange exchange = HitbtcExampleUtils.createExchange();
    PollingAccountService accountService = exchange.getPollingAccountService();

    generic(accountService);
    raw((HitbtcAccountServiceRaw) accountService);
  }
View Full Code Here

public class CoinbaseAccountDemo {

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

    Exchange coinbase = CoinbaseDemoUtils.createExchange();
    PollingAccountService accountService = coinbase.getPollingAccountService();

    generic(accountService);
    raw((CoinbaseAccountService) accountService);
  }
View Full Code Here

    exSpec.setApiKey("0feb4d7258aa828a76355e32940de94d3298bed2");
    exSpec.setSecretKey("b03caa2f83e6a42cd2780f0a245f020302eb4fe2a63d268135c927c4d88d265be8e4e559e9f3c812");

    Exchange cryptsyExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
    PollingAccountService accountService = cryptsyExchange.getPollingAccountService();
    PollingMarketDataService marketDataService = cryptsyExchange.getPollingMarketDataService();
    PollingTradeService tradeService = cryptsyExchange.getPollingTradeService();

    generic(accountService, marketDataService, tradeService);
    raw((CryptsyAccountServiceRaw) accountService, (CryptsyMarketDataServiceRaw) marketDataService, (CryptsyTradeServiceRaw) tradeService);
View Full Code Here

    raw(justcoinExchange);
  }

  private static void generic(Exchange justcoinExchange) throws IOException {

    PollingAccountService genericAccountService = justcoinExchange.getPollingAccountService();

    AccountInfo accountInfo = genericAccountService.getAccountInfo();
    System.out.println(accountInfo);

    String depositAddr = genericAccountService.requestDepositAddress(Currencies.LTC);
    System.out.println("LTC deposit address: " + depositAddr);

    String txid = genericAccountService.withdrawFunds("BTC", new BigDecimal("0.001"), "1Fpx2Q6J8TX3PZffgEBTpWSHG37FQBgqKB");
    System.out.println("See the withdrawal transaction: http://blockchain.info/tx-index/" + txid);
  }
View Full Code Here

    bitfinex.applySpecification(defaultExchangeSpecification);

    // get all services
    PollingMarketDataService marketDataService = bitfinex.getPollingMarketDataService();
    PollingAccountService accout = bitfinex.getPollingAccountService();
    PollingTradeService trades = bitfinex.getPollingTradeService();

    OrderBook orderBook = marketDataService.getOrderBook(new CurrencyPair("XBT", "USD"));
    System.out.println("BIDS: " + orderBook.getBids());
    System.out.println("ASKS: " + orderBook.getAsks());

    Trades trades2 = marketDataService.getTrades(new CurrencyPair("XBT", "USD"), 22233);
    System.out.println("Current trades:" + trades2);

    AccountInfo accountInfo = accout.getAccountInfo();

    System.out.println(accountInfo);
    OpenOrders openOrders = trades.getOpenOrders();
    System.out.println("open orders: " + openOrders);
View Full Code Here

public class BTERAccountDemo {

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

    Exchange exchange = BTERDemoUtils.createExchange();
    PollingAccountService accountService = exchange.getPollingAccountService();

    generic(accountService);
    raw((BTERPollingAccountServiceRaw) accountService);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.service.polling.PollingAccountService

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.