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,370 points
3,138 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,740 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,370 points
815 views
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,434 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
1,927 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,455 views
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,740 points
757 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP