<p>In Bitcoin, change is a normal output which sends the remaining money to one of your addresses. When creating a transaction with <code>createrawtransaction</code>, you have to add change output manually (just like any other output), otherwise that money would go to the miners.</p>

CC BY-SA 4.0
2018-09-01T16:12:43.517Z
i came with the same question because im not sure how to define the 2nd output. the example shows the output as a single object, not an array.
Sonic Soul
CC BY-SA 3.0
2014-10-01T06:29:20.770Z
2014-10-01T06:29:20.770Z
abacabadabacaba
<p>This question is almost the opposite of <a href="https://bitcoin.stackexchange.com/questions/28182/how-to-find-the-change-sender-address-given-a-txid">How to find the change / sender address given a txid?</a></p>

<p>If I am making a transaction using <code>createrawtransaction</code> how can I define the change (sender) address?</p>

<bitcoind><raw-transaction><change>
How can I define the change address of a transaction using createrawtransaction?
Felipe
# How can I define the change address of a transaction using createrawtransaction?

(Asked by: username_0 on 2014-06-28)

This question is almost the opposite of [How to find the change / sender address given a txid?](https://bitcoin.stackexchange.com/questions/28182/how-to-find-the-change-sender-address-given-a-txid)

If I am making a transaction using `createrawtransaction` how can I define the change (sender) address?

**Tags:** bitcoind, raw-transaction, change


---

## 1 answers

### Answer by username_1 on 2014-10-01. Score: 4 | Accepted answer

In Bitcoin, change is a normal output which sends the remaining money to one of your addresses. When creating a transaction with `createrawtransaction`, you have to add change output manually (just like any other output), otherwise that money would go to the miners.

> **Comments:**
> **username_2**: i came with the same question because im not sure how to define the 2nd output. the example shows the output as a single object, not an array.  

---

