Bitcoin Forum
September 25, 2018, 04:33:46 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: blockchain.info JSON  (Read 1014 times)
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1373



View Profile
January 24, 2013, 08:13:09 PM
 #1

There could be a bug in my code, so if anyone doesn't see the same issue as me, let me know and I'll dig further into my own code and close this thread, but as far as I can tell when I use the following URL:

Code:
http://blockchain.info/address/1AFs9GrQyPQpN5W73RzizcEap1CQ7whPZT?format=json

The JSON that I get back includes the following:

Code:
{ "result":1500000,
  "block_height":204163,
  "time":1350749027,
  "inputs":[ { "prev_out":{ "n":2,
                            "value":485942,
                            "addr":"16E2VCqveJZiEh77yXsh8GNpZFbY2t4hdk",
                            "tx_index":30122197,
                            "type":0
                          }
             },
             { "prev_out":{ "n":0,
                            "value":11000,
                            "addr":"139SbwC4T6LVR1mWjL8AqH4u4DCpZanR49",
                            "tx_index":30169217,
                            "type":0
                          }
             },
             { "prev_out":{ "n":1,
                            "value":1573077,
                            "addr":"1AFs9GrQyPQpN5W73RzizcEap1CQ7whPZT",
                            "tx_index":30211949,
                            "type":0
                          }
             },
             { "prev_out":{ "n":7,
                            "value":80000,
                            "addr":"1NNG4YUCJNVKpwGn1hwJ6bxYH26paYFHnA",
                            "tx_index":30093759,
                            "type":0
                          }
             }
           ],
  "vout_sz":2,
  "relayed_by":"178.150.63.172",
  "hash":"f43cf0e169de3a352dff67f046d4ae57983933f56766d45e203dfeb36b447559",
  "vin_sz":18,
  "tx_index":30215179,
  "ver":1,
  "out":[
        ],
  "size":2744
},

If I look at the same URL http://blockchain.info/address/1AFs9GrQyPQpN5W73RzizcEap1CQ7whPZT (without the ?format=json) using my browser I can find this same transaction, f43cf0e169de3a352dff67f046d4ae57983933f56766d45e203dfeb36b447559, and it has 2 outputs.  Why don't the outputs show up in the JSON?  Is this a bug, or am I misunderstanding the JSON API?

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

Posts: 1537850026

View Profile Personal Message (Offline)

Ignore
1537850026
Reply with quote  #2

1537850026
Report to moderator
piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1001



View Profile WWW
January 25, 2013, 01:28:17 AM
 #2

I can confirm this is a bug which may or may not appear depending on the request cookies. Please add "show_adv=true" to url as a fix for the time being.

http://blockchain.info/address/1AFs9GrQyPQpN5W73RzizcEap1CQ7whPZT?format=json&show_adv=true

DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1373



View Profile
January 25, 2013, 01:45:55 AM
 #3

I can confirm this is a bug which may or may not appear depending on the request cookies. Please add "show_adv=true" to url as a fix for the time being.

http://blockchain.info/address/1AFs9GrQyPQpN5W73RzizcEap1CQ7whPZT?format=json&show_adv=true
Thanks!

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!