<p>If you create a raw transaction yourself, then that is the raw transaction. Whatever you put in it is exactly what the transaction will be, in the same order.</p>
<p>There are some conventions around output ordering. Some software will randomly permute the outputs; other software uses BIP69 which specifies a deterministic ordering. There is however no requirement to follow either rule.</p>

CC BY-SA 4.0
2020-09-29T00:19:44.507Z
2020-09-29T00:19:44.507Z
Pieter Wuille
<p>Suppose I generate a transaction with 5 outputs.</p>
<p>Is there a deterministic way to know how the outputs will be ordered on chain (their <code>.n</code> values) or will they simply appear in the order in which I arranged them when created my rawTxn that I signed?</p>

<transactions><raw-transaction><output><standard>
Transaction Output Order
Albert Renshaw
# Transaction Output Order

(Asked by: username_0 on 2020-09-28)

Suppose I generate a transaction with 5 outputs.

Is there a deterministic way to know how the outputs will be ordered on chain (their `.n` values) or will they simply appear in the order in which I arranged them when created my rawTxn that I signed?

**Tags:** transactions, raw-transaction, output, standard


---

## 1 answers

### Answer by username_1 on 2020-09-29. Score: 4 | Accepted answer

If you create a raw transaction yourself, then that is the raw transaction. Whatever you put in it is exactly what the transaction will be, in the same order.

There are some conventions around output ordering. Some software will randomly permute the outputs; other software uses BIP69 which specifies a deterministic ordering. There is however no requirement to follow either rule.


---

