2
I have a list of bitcoin addresses provided by a user and I am trying to find out a sum deposited to these addresses. I am using blockexplorer.com API to obtain transactions.
This is a typical API call (for convenience only for one address) my script does. The call supports parameters from and to, these can be used to effectively streamline an entire transaction ledger.
https://blockexplorer.com/api/addrs/1Archive1n2C579dMsAu3iC6tWzuQJz8dN/txs?from=0&to=20
There appears to be no error in my streamlining algorithm, but if I summarize values found in valueIn (which should presumably stand for values sent to an address), the result is completely off when compared to result returned in API call totalReceived.
https://blockexplorer.com/api/addr/1Archive1n2C579dMsAu3iC6tWzuQJz8dN/totalReceived
Why am I getting a totally different results?
Is this a correct way to find out if a certain amount was deposited to address (or addresses)?
Fun fact: blockexplorer.com returns a value of totalReceived that is different from a value returned by blockchain.info.
The reason why I am not looking for a balance is that in my understanding this value is being lowered when value is sent out from this address. What I am looking for is actual value transmitted to an address without taking into account any possible "withdrawals". My application allows users to paste a list of addresses, then it monitors all of them, summarising the amount of bitcoins sent to them. – LostGoneAndNotFound – 2015-10-08T09:39:08.273