Package com.xeiam.xchange.coinbase.service.polling

Examples of com.xeiam.xchange.coinbase.service.polling.CoinbaseAccountService


public class CoinbaseButtonDemo {

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

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

    CoinbaseButtonBuilder buttonBuilder = new CoinbaseButtonBuilder("Demo Button", Currencies.BTC, ".001");
    buttonBuilder.withDescription("Coinbase button demo for Coinbase.").withIncludeEmail(true).withStyle(CoinbaseButtonStyle.DONATION_LARGE).withType(CoinbaseButtonType.DONATION).withVariablePrice(
        true);

    CoinbaseButton createdButton = accountService.createCoinbaseButton(buttonBuilder.buildButton());
    System.out.println(createdButton);

    CoinbaseOrder createdOrder = accountService.createCoinbaseOrder(createdButton.getCode());
    System.out.println(createdOrder);

    createdOrder = accountService.createCoinbaseOrder(createdButton);
    System.out.println(createdOrder);
  }
View Full Code Here


public class CoinbaseMerchantDemo {

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

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

    CoinbaseSubscriptions subscriptions = accountService.getCoinbaseSubscriptions();
    System.out.println(subscriptions);

    List<CoinbaseSubscription> subscriptionsList = subscriptions.getSubscriptions();
    if (!subscriptionsList.isEmpty()) {
      CoinbaseSubscription subscription = subscriptionsList.get(0);
      subscription = accountService.getCoinbaseSubscription(subscription.getId());
      System.out.println(subscription);
    }

    CoinbaseOrders orders = accountService.getCoinbaseOrders();
    System.out.println(orders);

    if (!orders.getOrders().isEmpty()) {
      CoinbaseOrder order = accountService.getCoinbaseOrder(orders.getOrders().get(0).getId());
      System.out.println(order);
    }
  }
View Full Code Here

  public void applySpecification(final ExchangeSpecification exchangeSpecification) {

    super.applySpecification(exchangeSpecification);

    this.pollingMarketDataService = new CoinbaseMarketDataService(exchangeSpecification);
    this.pollingAccountService = new CoinbaseAccountService(exchangeSpecification);
    this.pollingTradeService = new CoinbaseTradeService(exchangeSpecification);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinbase.service.polling.CoinbaseAccountService

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.