I have searched around for this and found the following article In getrawtransaction, what is the vout integer in the vin list?. However I am a very visual learner and this does not make much sense mostly because the two transactions I tested don't seem to follow the rule in the post or more likely I don't get it.

For transaction 1d7f54deccb7b2646a4ba83c6884dbac953b0588c8943d0e7e8f7c8f559d5d72 I expect the vout to be 1 which is correct and I validated through use of gettxid.

However for transaction ef96555197df4397ac4fed180903ce760fe8b59b85da83baba5ecd2a0fac7ec1 I expect the vout to be 2 which is not correct per validation with gettxid. The correct number is in fact 0.

Can anyone explain this to me why vout for the second transaction would be 0?

1 Answer 1


VOUT is the index of the output within the transaction that the input is spending. The first output in a transaction is index 0, the second is index 1, etc. The transaction you referenced has two outputs, so it has outputs 0 and 1. You would reference txid:0 to spend the first output and txid:1 to spend the second output.

  • Thank you that makes a ton of sense don't know why I was having trouble with it! Dec 31, 2013 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.