<p>Yes, you are correct.</p>
<p>Yes, you should assume that <code>vout_indexes</code> are zero-based indexes of the outputs provided to <code>createrawtransaction</code>.</p>
<p>You should use zero based indexes of outputs provided to <code>createrawtransaction</code>.</p>
<p>NOTE:</p>
<p>The final count and indexing of the transaction outputs may differ due to the addition of the change output, but you should ignore this fact for now.</p>

CC BY-SA 4.0
2021-08-21T04:54:52.983Z
2021-08-21T04:54:52.983Z
Biganashvili
<p>I am attempting to use fundrawtransaction, but I am a bit confused on how to populate the subtractFeeFromOutputs field...</p>

<pre><code> "subtractFeeFromOutputs": [(json array, optional, default=empty array) A json array of integers.
      The fee will be equally deducted from the amount of each specified output.
      Those recipients will receive less bitcoins than you enter in their corresponding amount field.
      If no outputs are specified here, the sender pays the fee.
vout_index, (numeric) The zero-based output index, before a change output is added.
</code></pre>

<p>Does the above mean I only need to provide an array of the vout_indexes?</p>

<p>If so, is the vout_indexes the position in which the outputs are in the array of outputs provided to createrawtransaction?</p>

<p>I could really use an example here...</p>

<bitcoin-cli><createrawtransaction>
How to fill in the subtractFeeFromOuputs field in fundrawtransaction
Jeffrey L. Roberts
# How to fill in the subtractFeeFromOuputs field in fundrawtransaction

(Asked by: username_0 on 2019-09-17)

I am attempting to use fundrawtransaction, but I am a bit confused on how to populate the subtractFeeFromOutputs field...

```
 "subtractFeeFromOutputs": [(json array, optional, default=empty array) A json array of integers.
      The fee will be equally deducted from the amount of each specified output.
      Those recipients will receive less bitcoins than you enter in their corresponding amount field.
      If no outputs are specified here, the sender pays the fee.
vout_index, (numeric) The zero-based output index, before a change output is added.

```

Does the above mean I only need to provide an array of the vout\_indexes?

If so, is the vout\_indexes the position in which the outputs are in the array of outputs provided to createrawtransaction?

I could really use an example here...

**Tags:** bitcoin-cli, createrawtransaction


---

## 1 answers

### Answer by username_1 on 2021-08-21. Score: 1

Yes, you are correct.

Yes, you should assume that `vout_indexes` are zero-based indexes of the outputs provided to `createrawtransaction`.

You should use zero based indexes of outputs provided to `createrawtransaction`.

NOTE:

The final count and indexing of the transaction outputs may differ due to the addition of the change output, but you should ignore this fact for now.


---

