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.