Author

Topic: help me to understand Blockchain.info Data API (Read 1021 times)

newbie
Activity: 56
Merit: 0
what is result in  "txs" field?
i was thinking that it is amount, but then I got confused: even you submit a list of addresses, blockchain gives you info grouped by tx, so if you happen to have two of your addresses in one tx, the result doesn't make sense.
It will correspond to one of the submitted addresses, right?
quite complicated...
as opposed to that blockr would not group info by tx but rather by addresses
example: http://btc.blockr.io/api/v1/address/txs/184vxW7JgzbixCN2ZGvyKLxvEXDevT6gaj,15ByNz4AR2uPEJGDrBAgSQgnrx54mReK11
common tx 7b2228e40906096eefb91724452c7209ffc2b939f941a3311ac940466f1de4b3 appears twice in the output
newbie
Activity: 56
Merit: 0
ok got it called block_height
thanks
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
but where is the number of confirmations???

Look at the block number.
newbie
Activity: 56
Merit: 0
but where is the number of confirmations???
newbie
Activity: 56
Merit: 0
ok, sorry I found the problem, this was related to JSON serialization
 case closed
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
What do you mean group them by input?  Can't you just parse the result?

Code:
   "txs":[{"result":-166022157,"vout_sz":2,"hash":"2fe6774ffba3ad5b1d57afc920a2f31041d877312d6fbfa0bbf15fbdef4b00cd","vin_sz":2,"tx_index":53614189,"ver":1,"size":374,"balance":50000000,"time":1396263660,"block_height":293382,"inputs":[{"prev_out":{"n":1,"value":40000000,"addr":"1DyYRc2iD3MRrrQyXQNLDUmLJpGxDmV6Y7","tx_index":53613184,"type":0,"script":"76a9148e5308ed5be6760a680770dcd1bdeefdbc8ecf7f88ac"},"script":"76a9148e5308ed5be6760a680770dcd1bdeefdbc8ecf7f88ac"},{"prev_out":{"n":1,"value":166022157,"addr":"1HxYTGPikRDJ6ybKbGjzvmrKbdQiSHh6An","tx_index":53595165,"type":0,"script":"76a914ba03255d6e3117b6a80cd41426ab64df8860b99b88ac"},"script":"76a914ba03255d6e3117b6a80cd41426ab64df8860b99b88ac"}],"relayed_by":"127.0.0.1","out":[{"n":0,"value":40000000,"addr":"18ehHHziH1DyMXvwQAnc9as1hXdAyxPEzc","tx_index":53614189,"spent":true,"type":0,"script":"76a91453e9e558cfaeafa01497080b4618296efac5c55d88ac"},{"n":1,"value":166012157,"addr":"17FGSh5JqbSwsx3xbKfxTE3kdtkAB3t9zn","tx_index":53614189,"spent":false,"type":0,"script":"76a91444837823716a3119e90b0b37d3a0ea473ec260b188ac"}]},{"result":166022157,"vout_sz":2,"hash":"5ddd47e94b55a12da491b24a36a659a0ec114ef01a2ee9c82e9cf1f645f38aca","vin_sz":2,"tx_index":53595165,"ver":1,"size":374,"balance":216022157,"time":1396238495,"block_height":293329,"inputs":[{"prev_out":{"n":0,"value":2450000000,"addr":"1GgRNfLapNCkLy5vSg3yFKZe46JGj9biX","tx_index":53595160,"type":0,"script":"76a91402f72551ce16cfa94fadbcd31161d2e11d58058288ac"},"script":"76a91402f72551ce16cfa94fadbcd31161d2e11d58058288ac"},{"prev_out":{"n":1,"value":166032157,"addr":"17rNybRxpyvWamMbLJi2yFGUjXUfAzPDqV","tx_index":53572503,"type":0,"script":"76a9144b277b3425b39bd660615dea346cd62e66d9755b88ac"},"script":"76a9144b277b3425b39bd660615dea346cd62e66d9755b88ac"}],"relayed_by":"127.0.0.1","out":[{"n":1,"value":166022157,"addr":"1HxYTGPikRDJ6ybKbGjzvmrKbdQiSHh6An","tx_index":53595165,"spent":false,"type":0,"script":"76a914ba03255d6e3117b6a80cd41426ab64df8860b99b88ac"}]},{"result":50000000,"vout_sz":2,"hash":"f77dc7617bc0aee2a94c438804e6b2156d8f5d2d2ad265dbe99af785d007bcda","vin_sz":1,"tx_index":53530007,"ver":1,"size":226,"balance":50000000,"time":1396151405,"block_height":293180,"inputs":[{"prev_out":{"n":1,"value":600000000,"addr":"19BEGrkEoj2A4PzYASQyQB4PWkwjBHbYv4","tx_index":53339529,"type":0,"script":"76a91459b03ef7fab410f793f121adc091b633772e06bd88ac"},"script":"76a91459b03ef7fab410f793f121adc091b633772e06bd88ac"}],"relayed_by":"129.132.230.77","out":[{"n":0,"value":50000000,"addr":"17BAPwLRZq9zpwwEeow9rBwb1TAypkp2jC","tx_index":53530007,"spent":true,"type":0,"script":"76a91443bcc1db9fc30b9df8fe404347341e3c2634e25e88ac"}]}]
newbie
Activity: 56
Merit: 0
I want to get latest deposit transactions for multiple addresses
https://blockchain.info/api/blockchain_api
section Multi Address

https://blockchain.info/multiaddr?active=17BAPwLRZq9zpwwEeow9rBwb1TAypkp2jC|1HxYTGPikRDJ6ybKbGjzvmrKbdQiSHh6An
i can't figure out how to group transaction by address (no joke). Such a simple thing took me a couple of hours already. When I look at the list of txs i can't figure out the algorithm that I can detect a new deposit to an address

no issue with blockr, were i can see clearly deposits, because txs are grouped by addresses, but i need blockchain
Jump to: