Bitcoin Forum
December 11, 2017, 07:40:13 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: blockchain.info Payment API  (Read 793 times)
richiela
Hero Member
*****
Offline Offline

Activity: 938


View Profile
November 28, 2013, 04:58:18 AM
 #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

Looking for the best exchange? -> https://bittrex.com
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1512978013
Hero Member
*
Offline Offline

Posts: 1512978013

View Profile Personal Message (Offline)

Ignore
1512978013
Reply with quote  #2

1512978013
Report to moderator
1512978013
Hero Member
*
Offline Offline

Posts: 1512978013

View Profile Personal Message (Offline)

Ignore
1512978013
Reply with quote  #2

1512978013
Report to moderator
doof
Hero Member
*****
Offline Offline

Activity: 765


View Profile WWW
November 28, 2013, 11: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

richiela
Hero Member
*****
Offline Offline

Activity: 938


View Profile
November 29, 2013, 03:29:12 AM
 #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? 

Looking for the best exchange? -> https://bittrex.com
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!