Author

Topic: blockchain.info Payment API (Read 847 times)

hero member
Activity: 937
Merit: 1000
November 28, 2013, 10:29:12 PM
#3
The simple address method shows you final balance (final_balance) property

http://blockchain.info/address/$bitcoin_address?format=json

Eg http://blockchain.info/address/1Cvy1Exv3y6FT6oLp7va6jmEVqBsM3fTPw?format=json should yield 0.0021



Yup I understand that, but how do I get that same info using JSON-RPC to the bitcoind daemon?  Does blockchain actually keep tracking of every transaction? 
hero member
Activity: 765
Merit: 503
November 28, 2013, 06:20:23 PM
#2
The simple address method shows you final balance (final_balance) property

http://blockchain.info/address/$bitcoin_address?format=json

Eg http://blockchain.info/address/1Cvy1Exv3y6FT6oLp7va6jmEVqBsM3fTPw?format=json should yield 0.0021

hero member
Activity: 937
Merit: 1000
November 27, 2013, 11:58:18 PM
#1
Can anyone help me understand how their payment API works at a bitcoind rpc level?  As far as I can tell, there is no way to see what the balance of an address is, only the number of bitcoins that address has received along with the confirmations for it.

If I were to replicate the blockchain API, i would have to:

* create an address and associated it to an account (destination address)
* check the balance of all accounts
* get a list of all addresses in that account
* check all the addresses looking for the lowest confirmations
    - if value < balance loop back to ensure to check other addresses
* locate callback and call that
* move btcs from account to destination address
* repeat

Is it really that convoluted or am I missing something much simpler?  I currently run a website that processes BTC payments but i'd like to move away from relying on blockchain.info.

Thanks
Jump to: