Bitcoin Forum

Economy => Service Discussion => Topic started by: IdiotCoder on February 18, 2017, 07:27:18 PM



Title: Blockchain API: Insufficient funds
Post by: IdiotCoder on February 18, 2017, 07:27:18 PM
I am making a PHP script which uses Blockchain's Node.js API. However, when I try to programmatically send BTC0.0005 to my Bitcoin Core wallet locally installed on my Mac Mini, I get the following error in my Blockchain console:

Quote
1487445233151 - error: Insufficient funds. Value Needed 0.0004BTC. Available amount 0BTC

I followed the instructions listed on the Blockchain API (https://blockchain.info/api/blockchain_wallet_api) but I still get this error. I googled the problem involving 0 BTC in the Blockchain wallet, but I have more than enough what I'm sending. Here's the rhe relevant code:
Code:
       $guid="(removed)";
        $password="(removed)";
        $amount = "30000";
        $to = '1CSjpwvXPzRMG3ksVq7PFA2tz7PumnNNbS';


        $json_url = "http://localhost:3000/merchant/$guid/payment?password=$password&to=$to&amount=$amount&from=1qmAhtjgYKv12RMRM18t5HAPMrxM24f8t";

        $json_data = file_get_contents($json_url);

        $json_feed = json_decode($json_data);

        return var_dump($json_feed);


Thanks in advance for the help!


Title: Re: Blockchain API: Insufficient funds
Post by: eckmar on February 18, 2017, 10:13:03 PM
I am making a PHP script which uses Blockchain's Node.js API.

I don't really understand what you are trying to do (or wanted to say)here ? Anyway since you pretty much copy/pasted code from their example there is no error there I guess. Check if you are using guid from wallet that actually have any funds or maybe you made mistake with wallets ?