<p><code>vout</code> is the 0 based output index. It can be more than just <code>0</code> or <code>1</code>, but those tend to be the most common because people don't make transactions with lots of outputs.</p>
<p>To understand <code>vout</code>, you must understand how Bitcoin transactions actually work. A Bitcoin transaction consumes transaction outputs as inputs, and creates transaction outputs. It can consume multiple transaction outputs, and create multiple transaction outputs. Furthermore, these transaction outputs can be consumed by different transactions, so each one needs to be able to be uniquely identified. So a unique identifier contains two items: the transaction id to identify the transaction an output belongs to, and an index to point to the position in the list of outputs in that particular transaction.</p>
<p>That index is what the <code>vout</code> is. As with many things in computer science, it is a 0 based counter so the first item is at index <code>0</code>, the second at <code>1</code>, and so on.</p>
<p><code>listsinceblock</code>, <code>listtransactions</code>, and some other RPCs in Bitcoin Core don't actually list Bitcoin transactions. Rather they list the logical transaction - the one that humans tend to think of. This is because a single Bitcoin transaction can both send Bitcoin away from you, and allow you to receive Bitcoin.</p>
<p>In a single Bitcoin transaction, you can be consuming your own transaction outputs, so the transaction is sending your Bitcoin away. However not all transactions contain inputs from the same person. This transaction could involve another person who has their own transaction outputs as inputs to this transaction. And perhaps they are creating an output that you would be able to spend. So this transaction is also sending Bitcoin to you. This single Bitcoin transaction would then consist of two logical transactions - one where you are sending, and one where you are receiving.</p>
<p>This can often occur with change outputs, but the software should not be showing you those as it is smart enough to hide them and not consider them as a distinct logical transaction. Change outputs are when a transaction output is created by you that sends the Bitcoin back to yourself. They exist because a transaction output must be spent in full, but often the amount you are actually sending does not exactly match the exact amount of the output your are spending. So you must create an output that sends the remainder back to yourself.</p>

CC BY-SA 4.0
2022-05-09T09:43:15.693Z
So, if I want to check all deposits given from listsinceblock response, I need to merge the amount of the transactions with the same transaction id?
Giacomo Brunetta
CC BY-SA 4.0
2022-05-10T01:47:34.437Z
Yes. Each received output will be listed separately.
Ava Chow
CC BY-SA 4.0
2021-01-01T20:54:31.057Z
2021-01-01T20:54:31.057Z
Ava Chow
<p>Bitcoin funds are tracked in <em>Unspent Transaction Outputs (UTXO)</em>. Whenever you send bitcoins, your wallet software declares which specific UTXOs get spent and creates new UTXOs to assign the funds to the paid parties. Even in the simplest case, a transaction usually creates two new outputs: one to pay the receiver of the payment and one to reassign the left over change to the sender.</p>
<p>As a transaction can have multiple outputs, the <code>txid</code> is not sufficient to uniquely identify UTXOs. However, since the order of the outputs in a transaction is fixed and each position can only appear once, a UTXO can be uniquely identified by the transaction that created it plus the position in the output list. <code>vout</code> is the index of a UTXO in the transaction's output list. We call <code>txid:vout</code> the <em>outpoint</em> of a UTXO.</p>
<p><a href="https://i.sstatic.net/az0gS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/az0gS.png" alt="enter image description here" /></a></p>
<p>In this annotated screenshot from <a href="https://blockstream.info/tx/39b6bcf049fbfba73c2e594327cafd4f93b1c23979e138d4c56ab3b7d04172ad" rel="nofollow noreferrer">blockstream.info</a>, you see transaction <code>39b6bcf049fbfba73c2e594327cafd4f93b1c23979e138d4c56ab3b7d04172ad</code>. It spends one UTXO, the 5th output (vout: 4, we start counting at 0) of transaction <code>cc90096df338a6894aeef47043b995942758a1dfe52e579560e39730602a7ca4</code>, and creates seven new UTXOs identified as <code>39b6bc…4172ad:0</code> through <code>39b6bc…4172ad:6</code>.</p>
<p><code>listsinceblock</code> only tells you about the output that facilitated a payment to or from your wallet. When receiving, that's the output that credited your wallet, when sending, it shows the output that paid the receiver.</p>

CC BY-SA 4.0
2022-05-09T09:44:44.920Z
So, if I want to check all deposits given from listsinceblock response, I need to merge the amount of the transactions with the same transaction id?
Giacomo Brunetta
CC BY-SA 4.0
2022-05-09T10:36:02.013Z
`listsinceblock` should tell you the amounts you received. What are you trying to do and what happened?
Murch
CC BY-SA 4.0
2022-05-09T10:46:40.843Z
My question is: if someone pay to me 1 btc for example, I will see it in a single transaction on the result of the listsinceblocks? Ore maybe I can see it in 2 or more transaction (for example 0.5 and 0.5 btc), but referring the to the same payment?
Giacomo Brunetta
CC BY-SA 4.0
2022-05-09T13:13:53.513Z
You should see one list entry per received output. (It's smart enough not to show you change outputs, though.) If you received one output, it should be listed once, if you received two outputs, it would be listed twice.
Murch
CC BY-SA 4.0
2021-01-02T16:42:42.357Z
2021-01-02T16:42:42.357Z
Murch
<p>This is driving me nuts. Through trial-and-error, asking numerous people and attempting to read endless articles and manuals, I've come to the conclusion that the &quot;transactions&quot; listed by <code>listsinceblock</code> are quite misleading.</p>
<p>They are not transactions at all?</p>
<p>The &quot;txid&quot; field is not unique, for example. It is only unique when coupled with the mysterious &quot;vout&quot; field, which can apparently be <code>0</code> or <code>1</code>.</p>
<p>This, coupled with the multiple different &quot;categories&quot; (besides <code>receive</code> and <code>send</code>) really make me confused and worried that my Bitcoin Core-based payment system is somehow fundamentally broken.</p>
<p>Can somebody please explain to me once and for all why <code>vout</code> exists and why <code>txid</code> is not unique? And what does this mean in practice? Is this because a &quot;Bitcoin payment&quot; can be made in multiple different &quot;sub-transactions&quot;? I never was able to understand the purpose of that, and it's making me beyond confused.</p>
<p>Would love to get this straightened out now that I'm actually close to actually launching a Bitcoin service!</p>

CC BY-SA 4.0
2021-01-02T16:46:42.887Z
related: https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for/100766#100766
Antoine Poinsot
<bitcoin-core><json-rpc><api><utxo><output>
What exactly is the "vout" field?
S. C.
# What exactly is the "vout" field?

(Asked by: username_0 on 2021-01-01)

This is driving me nuts. Through trial-and-error, asking numerous people and attempting to read endless articles and manuals, I've come to the conclusion that the "transactions" listed by `listsinceblock` are quite misleading.

They are not transactions at all?

The "txid" field is not unique, for example. It is only unique when coupled with the mysterious "vout" field, which can apparently be `0` or `1`.

This, coupled with the multiple different "categories" (besides `receive` and `send`) really make me confused and worried that my Bitcoin Core-based payment system is somehow fundamentally broken.

Can somebody please explain to me once and for all why `vout` exists and why `txid` is not unique? And what does this mean in practice? Is this because a "Bitcoin payment" can be made in multiple different "sub-transactions"? I never was able to understand the purpose of that, and it's making me beyond confused.

Would love to get this straightened out now that I'm actually close to actually launching a Bitcoin service!

**Tags:** bitcoin-core, json-rpc, api, utxo, output

> **Comments:**
> **username_1**: related: https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for/100766#100766  

---

## 2 answers

### Answer by username_2 on 2021-01-01. Score: 5

`vout` is the 0 based output index. It can be more than just `0` or `1`, but those tend to be the most common because people don't make transactions with lots of outputs.

To understand `vout`, you must understand how Bitcoin transactions actually work. A Bitcoin transaction consumes transaction outputs as inputs, and creates transaction outputs. It can consume multiple transaction outputs, and create multiple transaction outputs. Furthermore, these transaction outputs can be consumed by different transactions, so each one needs to be able to be uniquely identified. So a unique identifier contains two items: the transaction id to identify the transaction an output belongs to, and an index to point to the position in the list of outputs in that particular transaction.

That index is what the `vout` is. As with many things in computer science, it is a 0 based counter so the first item is at index `0`, the second at `1`, and so on.

`listsinceblock`, `listtransactions`, and some other RPCs in Bitcoin Core don't actually list Bitcoin transactions. Rather they list the logical transaction - the one that humans tend to think of. This is because a single Bitcoin transaction can both send Bitcoin away from you, and allow you to receive Bitcoin.

In a single Bitcoin transaction, you can be consuming your own transaction outputs, so the transaction is sending your Bitcoin away. However not all transactions contain inputs from the same person. This transaction could involve another person who has their own transaction outputs as inputs to this transaction. And perhaps they are creating an output that you would be able to spend. So this transaction is also sending Bitcoin to you. This single Bitcoin transaction would then consist of two logical transactions - one where you are sending, and one where you are receiving.

This can often occur with change outputs, but the software should not be showing you those as it is smart enough to hide them and not consider them as a distinct logical transaction. Change outputs are when a transaction output is created by you that sends the Bitcoin back to yourself. They exist because a transaction output must be spent in full, but often the amount you are actually sending does not exactly match the exact amount of the output your are spending. So you must create an output that sends the remainder back to yourself.

> **Comments:**
> **username_3**: So, if I want to check all deposits given from listsinceblock response, I need to merge the amount of the transactions with the same transaction id?  
> **username_2**: Yes. Each received output will be listed separately.  

---

### Answer by username_4 on 2021-01-02. Score: 3

Bitcoin funds are tracked in *Unspent Transaction Outputs (UTXO)*. Whenever you send bitcoins, your wallet software declares which specific UTXOs get spent and creates new UTXOs to assign the funds to the paid parties. Even in the simplest case, a transaction usually creates two new outputs: one to pay the receiver of the payment and one to reassign the left over change to the sender.

As a transaction can have multiple outputs, the `txid` is not sufficient to uniquely identify UTXOs. However, since the order of the outputs in a transaction is fixed and each position can only appear once, a UTXO can be uniquely identified by the transaction that created it plus the position in the output list. `vout` is the index of a UTXO in the transaction's output list. We call `txid:vout` the *outpoint* of a UTXO.

[![enter image description here](https://i.sstatic.net/az0gS.png)](https://i.sstatic.net/az0gS.png)

In this annotated screenshot from [blockstream.info](https://blockstream.info/tx/39b6bcf049fbfba73c2e594327cafd4f93b1c23979e138d4c56ab3b7d04172ad), you see transaction `39b6bcf049fbfba73c2e594327cafd4f93b1c23979e138d4c56ab3b7d04172ad`. It spends one UTXO, the 5th output (vout: 4, we start counting at 0) of transaction `cc90096df338a6894aeef47043b995942758a1dfe52e579560e39730602a7ca4`, and creates seven new UTXOs identified as `39b6bc…4172ad:0` through `39b6bc…4172ad:6`.

`listsinceblock` only tells you about the output that facilitated a payment to or from your wallet. When receiving, that's the output that credited your wallet, when sending, it shows the output that paid the receiver.

> **Comments:**
> **username_3**: So, if I want to check all deposits given from listsinceblock response, I need to merge the amount of the transactions with the same transaction id?  
> **username_4**: `listsinceblock` should tell you the amounts you received. What are you trying to do and what happened?  
> **username_3**: My question is: if someone pay to me 1 btc for example, I will see it in a single transaction on the result of the listsinceblocks? Ore maybe I can see it in 2 or more transaction (for example 0.5 and 0.5 btc), but referring the to the same payment?  
> **username_4**: You should see one list entry per received output. (It's smart enough not to show you change outputs, though.) If you received one output, it should be listed once, if you received two outputs, it would be listed twice.  

---

