Bitcoin Forum
October 16, 2017, 11:57:23 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: blockchain.info JSON RPC API Issue  (Read 1160 times)
JasperDX7
Jr. Member
*
Offline Offline

Activity: 37


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?

1508198243
Hero Member
*
Offline Offline

Posts: 1508198243

View Profile Personal Message (Offline)

Ignore
1508198243
Reply with quote  #2

1508198243
Report to moderator
1508198243
Hero Member
*
Offline Offline

Posts: 1508198243

View Profile Personal Message (Offline)

Ignore
1508198243
Reply with quote  #2

1508198243
Report to moderator
1508198243
Hero Member
*
Offline Offline

Posts: 1508198243

View Profile Personal Message (Offline)

Ignore
1508198243
Reply with quote  #2

1508198243
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508198243
Hero Member
*
Offline Offline

Posts: 1508198243

View Profile Personal Message (Offline)

Ignore
1508198243
Reply with quote  #2

1508198243
Report to moderator
1508198243
Hero Member
*
Offline Offline

Posts: 1508198243

View Profile Personal Message (Offline)

Ignore
1508198243
Reply with quote  #2

1508198243
Report to moderator
JasperDX7
Jr. Member
*
Offline Offline

Activity: 37


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!