0

I'm using the blockchain API to make a "send to many transaction". In the recipients I only put other people addresses, but somehow the API sends the remainder of my balance back to me.

For example:

https://blockchain.info/tx/b4c3203815fdf61616c0a2358fa0388e734bf53503f0a659d3c9fc7863da8adc

I had 0.01 btc in my wallet. I sent 0.0000543 BTC to two different recipients, but somehow my whole balance got spent and my 0.0097914 BTC got sent back to me. I didn't ask for this.

EDIT: It also happens on a singular transaction:

https://blockchain.info/tx/2eb4273313e27c2ede86844c58f687dc535aeaa5207e9a9c4a526a032cd5143a

I've inspected the API calls and they are correct. My address is no where to be seen in it.

Why is this happening?

Murch
  • 75,206
  • 34
  • 186
  • 622
joaoroque
  • 1
  • 2

1 Answers1

2

That's how Bitcoin works. Accounts don't really have balances, they have unspent outputs. You have to spend entire outputs, but you can return amounts to yourself to create a new "change" output that you can spend later.

David Schwartz
  • 51,554
  • 6
  • 106
  • 178