Package com.xeiam.xchange.coinbase.dto.account

Examples of com.xeiam.xchange.coinbase.dto.account.CoinbaseTransaction$CoinbaseSendMoneyRequest


   * @return
   * @throws IOException
   */
  public CoinbaseTransaction getCoinbaseTransaction(final String transactionIdOrIdemField) throws IOException {

    final CoinbaseTransaction transaction = coinbase.getTransactionDetails(transactionIdOrIdemField, exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return handleResponse(transaction);
  }
View Full Code Here


   * @return A pending {@code CoinbaseTransaction} representing the desired {@code CoinbaseRequestMoneyRequest}.
   * @throws IOException
   */
  public CoinbaseTransaction requestMoneyCoinbaseRequest(final CoinbaseRequestMoneyRequest transactionRequest) throws IOException {

    final CoinbaseTransaction pendingTransaction = coinbase.requestMoney(new CoinbaseTransaction(transactionRequest), exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return handleResponse(pendingTransaction);
  }
View Full Code Here

   * @return A completed {@code CoinbaseTransaction} representing the desired {@code CoinbaseSendMoneyRequest}.
   * @throws IOException
   */
  public CoinbaseTransaction sendMoneyCoinbaseRequest(final CoinbaseSendMoneyRequest transactionRequest) throws IOException {

    final CoinbaseTransaction pendingTransaction = coinbase.sendMoney(new CoinbaseTransaction(transactionRequest), exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return handleResponse(pendingTransaction);
  }
View Full Code Here

   * @return The {@code CoinbaseTransaction} representing the completed {@code CoinbaseSendMoneyRequest}.
   * @throws IOException
   */
  public CoinbaseTransaction completeCoinbaseRequest(final String transactionId) throws IOException {

    final CoinbaseTransaction response = coinbase.completeRequest(transactionId, exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return handleResponse(response);
  }
View Full Code Here

   */
  @Override
  public String withdrawFunds(String currency, BigDecimal amount, String address) throws IOException {

    final CoinbaseSendMoneyRequest sendMoneyRequest = CoinbaseTransaction.createSendMoneyRequest(address, currency, amount);
    final CoinbaseTransaction sendMoneyTransaction = super.sendMoneyCoinbaseRequest(sendMoneyRequest);
    return sendMoneyTransaction.getId();
  }
View Full Code Here

  }

  private static void demoTransactions(CoinbaseAccountService accountService) throws IOException {

    CoinbaseRequestMoneyRequest moneyRequest = CoinbaseTransaction.createMoneyRequest("xchange@demo.com", Currencies.BTC, new BigDecimal(".001")).withNotes("test");
    CoinbaseTransaction pendingTransaction = accountService.requestMoneyCoinbaseRequest(moneyRequest);
    System.out.println(pendingTransaction);

    CoinbaseBaseResponse resendResponse = accountService.resendCoinbaseRequest(pendingTransaction.getId());
    System.out.println(resendResponse);

    CoinbaseBaseResponse cancelResponse = accountService.cancelCoinbaseRequest(pendingTransaction.getId());
    System.out.println(cancelResponse);

    // CoinbaseSendMoneyRequest sendMoneyRequest = CoinbaseTransaction
    // .createSendMoneyRequest("1Fpx2Q6J8TX3PZffgEBTpWSHG37FQBgqKB", MoneyUtils.parse("BTC .01"))
    // .withNotes("Demo Money!").withInstantBuy(false).withUserFee("0.0");
    // CoinbaseTransaction sendTransaction = accountService.sendMoney(sendMoneyRequest);
    // System.out.println(sendTransaction);

    // CoinbaseTransaction completedTransaction = accountService.completeRequest("530010d62b342891e2000083");
    // System.out.println(completedTransaction);

    CoinbaseTransactions transactions = accountService.getCoinbaseTransactions();
    System.out.println(transactions);

    if (transactions.getTotalCount() > 0) {
      CoinbaseTransaction transaction = accountService.getCoinbaseTransaction(transactions.getTransactions().get(0).getId());
      System.out.println(transaction);
    }
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinbase.dto.account.CoinbaseTransaction$CoinbaseSendMoneyRequest

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.