The bug is with https://bitcoinchain.com
Before I report it I would like to see if I can gain any additional clues as to what might be going on in order to assist their developers to get to the root of the problem quickly.
If I call their API like so:
https://api-r.bitcoinchain.com/v1/address/utxo/1KZnzTTfuxiyHUJdLqn3UnHyTVDN2UgeHU
then add up all of the utxo.amounts they gave me for the wallet in question I get 0.57944267
But if you examine the wallet here https://blockchain.info/address/1KZnzTTfuxiyHUJdLqn3UnHyTVDN2UgeHU
you see that it really holds 1.15968995
With a little digging I see at least two of the utxos txid/hash(s) where they have incorrectly got the wrong output:
https://blockchain.info/tx/37ff697bc958071e6f6dc180f9b80edda8f87ab0ca2ad5cd3753e8f65c38e463
they have picked the wrong wallet address
1o69bsLaqaAM6R7bomaGVFT7uvGFvziTy
and
they have picked the wrong wallet addess
16tk4YEYpE6taGzZjkH9aiEApLLDR8UZL9
Not every utxo has this mistake, so it could be ruled out that they are always picking the first output.
I would have thought that they should just be asking if the output address matches the queried address but if they were doing that then surely this bug would not exist!
What other factors could cause this?