Bitcoin Forum
May 28, 2024, 09:17:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: blockchain.info JSON RPC API Issue  (Read 1276 times)
JasperDX7 (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
May 09, 2013, 11: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:
<?php
require_once('classes/jsonRPCClient.php');

$address "BITCOIN_ADDRESS";
$bitcoin = new jsonRPCClient('http://USER_Identifier:PASSWORD@rpc.blockchain.info:80/');


echo 
"<pre>\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 
"</pre>";
?>



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?

JasperDX7 (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
May 11, 2013, 03:22:35 PM
 #2

Seems like the BlockChain API works fine for me but the JSON-RPC does not Sad.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!