Author

Topic: blockchain.info JSON RPC API Issue (Read 1301 times)

newbie
Activity: 37
Merit: 0
May 11, 2013, 10:22:35 AM
#2
Seems like the BlockChain API works fine for me but the JSON-RPC does not Sad.
newbie
Activity: 37
Merit: 0
May 09, 2013, 06:29:30 PM
#1
I've been having a horrible time attempting to connect to blockchain.info using the JSON RPC API.

Here's what I have for testing code

Code:
require_once('classes/jsonRPCClient.php');

$address "BITCOIN_ADDRESS";
$bitcoin = new jsonRPCClient('http://USER_Identifier:[email protected]:80/');


echo 
"
\n";

print_r($bitcoin->getinfo()); echo "\n";
print_r($bitcoin->getaccount($address)); echo "\n";
$account $bitcoin->getaccount($address);
print_r($bitcoin->getaccountaddress($account)); echo "\n";
echo 
"Received: ".number_format($bitcoin->getbalance($account), 7) . " BTC\n";
echo 
"Received: ".number_format($bitcoin->getbalance($address), 7) . " BTC\n";

echo 
"
"
;
?>



And here is the response I get back

Quote
Array
(
    [balance] => 0
    [errors] =>
    [paytxfee] => 0
    [proxy] =>
    [connected] => 1176
    [testnet] =>
    [difficulty] => 10076292.883419
    [blocks] => 235379
)

TEST_LABLE
BITCOIN ADDRESS OF THE MAIN ACCOUNT
Received: 0.0000000 BTC
Received: 0.0000000 BTC


There's currently around 0.0000754 coins in the account so I'm not sure why it's returning 0. It seems like I can't access anything to do with my account aside from finding out what label is associated with a given bitcoin address. Am I missing something?

Jump to: