Author

Topic: Blockchain API: Insufficient funds (Read 374 times)

legendary
Activity: 1878
Merit: 1038
Telegram: https://t.me/eckmar
February 18, 2017, 05:13:03 PM
#2
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 ? 
member
Activity: 193
Merit: 26
February 18, 2017, 02:27:18 PM
#1
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 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!
Jump to: