how to integrate coinbase api in php for transfer bitcoine

0 votes

I want to transfer bitcoin through bitcoin address in PHP and I dont know how to do it. Can someone tell me how to do it?

Sep 14, 2018 in Blockchain by slayer
• 29,170 points
243 views

2 answers to this question.

0 votes

Try This code for transfer btc

$transaction = Transaction::send();
$transaction->setToBitcoinAddress('here btc address to transfer');
$transaction->setAmount(new Money(0.0010, CurrencyCode::BTC));
$transaction->setDescription('this is optional');
answered Sep 14, 2018 by digger
• 26,550 points
0 votes

Here the code for php please have a look

<?php
   $guid = "GUID_HERE";
    $firstpassword = "PASSWORD_HERE";
    $secondpassword = "PASSWORD_HERE";
    $amounta = "10000000";
     $amountb = "400000";
      $addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
      $addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
       $recipients = urlencode('{
          "' . $addressa . '": ' . $amounta . ',
          "' . $addressb . '": ' . $amountb . '
       }');

       $json_url = "http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients";

      $json_data = file_get_contents($json_url);

    $json_feed = json_decode($json_data);

     $message = $json_feed->message;
    $txid = $json_feed->tx_hash;
    ?>
answered Sep 17, 2018 by Suresh

Related Questions In Blockchain

0 votes
1 answer

How to Track Payment API in Coinbase

Use the callback_url option as described in the API. READ MORE

answered Sep 5, 2018 in Blockchain by slayer
• 29,170 points
40 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
80 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
153 views
0 votes
1 answer
0 votes
1 answer

How to get property of non object in Coinbase API

First, your sendMoney() call is stored into ...READ MORE

answered Aug 31, 2018 in Blockchain by digger
• 26,550 points
37 views
0 votes
1 answer