Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: BitCoinDream on February 27, 2014, 02:36:56 PM



Title: How to automate Bitcoin withdrawal
Post by: BitCoinDream on February 27, 2014, 02:36:56 PM
I have seen in applications like Satoshi Dice bitcoin withdrawal is automated. Can someone please point to some API or something that enables this automation on web wallet like blockchain.info ?


Title: Re: How to automate Bitcoin withdrawal
Post by: Automatic on February 27, 2014, 02:39:05 PM
How I recommend doing it, allows a lot of customization:-
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Blockchain.info:-
https://blockchain.info/api


Title: Re: How to automate Bitcoin withdrawal
Post by: BitCoinDream on February 27, 2014, 03:26:15 PM
How I recommend doing it, allows a lot of customization:-
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Blockchain.info:-
https://blockchain.info/api

Thank you for your response. For the recommended part I need to run Bitcoind on a web server I guess.


Title: Re: How to automate Bitcoin withdrawal
Post by: lukesims on May 06, 2014, 07:27:09 AM
I recently encountered the same issue and created a PHP class that simplifies using the blockchain wallet API. Using the API you can maintain a wallet, generate addresses, send money etc.

Take a look at the class on github https://github.com/lukesims/Blockchain-Wallet-API-PHP-Class/ (https://github.com/lukesims/Blockchain-Wallet-API-PHP-Class/)

It's as easy as
Code:
<?php

require_once("blockchain.php");

$myWallet = new Blockchain"Identifier""Main Password""Second Password" );

$options = array( "from"   => "18d3cd2DVzcWMtpwShJGxEcRHx8LRZCShr",
                  
"shared" => "false",
                  
"fee"    => "55000",
                  
"note"   => "Money is not our god");

$sendCoins $myWallet->sendCoins"1Gp4K5AnNmT6tdSt5Hv5EArsBBWQi169Ks""124842"$options );

if( 
$sendCoins !== false )
{
    
$message             $sendCoins->message;
    
$tx_hash             $sendCoins->tx_hash;
    
$additional_message  $sendCoins->notice;
}

?>



Title: Re: How to automate Bitcoin withdrawal
Post by: Mitchell on May 06, 2014, 07:32:40 AM
I recently encountered the same issue and created a PHP class that simplifies using the blockchain wallet API. Using the API you can maintain a wallet, generate addresses, send money etc.

Take a look at the class on github https://github.com/lukesims/Blockchain-Wallet-API-PHP-Class/ (https://github.com/lukesims/Blockchain-Wallet-API-PHP-Class/)

It's as easy as
-SNIP-
This looks great! Well done ;)