<p><strong>Transaction inputs (vin's) are simply unspent transaction outputs of a previous transaction. Here's an example to help clarify:</strong></p>

<pre><code>"vin": [
    {
      "txid": "6adf304f0a3e2afc92d864086202551041dfe0543f3116cc6f5c3b29e795fcaa",
      "vout": 1,
      "scriptSig": {
        "asm": "3044022079aca1fc033403856de39f03c856bf54b79efdaa210237a858d10675635e7b9e02206163547e0df9322fc337ab807f2874fbe1baec303bd874b3eb19c43a56b955ed[ALL] 0424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f",
        "hex": "473044022079aca1fc033403856de39f03c856bf54b79efdaa210237a858d10675635e7b9e02206163547e0df9322fc337ab807f2874fbe1baec303bd874b3eb19c43a56b955ed01410424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f"
      },
      "sequence": 4294967295
    },
    {
      "txid": "0047a70c729621f3b27897edc7a7a89c55d094b0241a91dd7a7a0fcd5351cbdd",
      "vout": 1,
      "scriptSig": {
        "asm": "30450220776842cd9d76924f0648ff434b64fef8739952684c184b4ce959ebfb2d9c9b3d022100fc101c92309a693a9fcf67c41efbb6c55483edc41d6fd66e3b3bbec7cc95fe88[ALL] 0424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f",
        "hex": "4830450220776842cd9d76924f0648ff434b64fef8739952684c184b4ce959ebfb2d9c9b3d022100fc101c92309a693a9fcf67c41efbb6c55483edc41d6fd66e3b3bbec7cc95fe8801410424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f"
      },
      "sequence": 4294967295
    }
  ],
</code></pre>

<p><strong>So to get the value for the first vin, you'll need to make another getrawtransaction call with txid: 6adf304f0a3e2afc92d864086202551041dfe0543f3116cc6f5c3b29e795fcaa</strong></p>

<p><strong>Then look for the 2nd vout output (since vout is 1, which means index 1). So the value will be 0.02039242:</strong></p>

<pre><code>  "vout": [
    {
      "value": 0.02000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 27470c0fb0c4a68221f80bf01bf0e267a0a48d68 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91427470c0fb0c4a68221f80bf01bf0e267a0a48d6888ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "14agTvSiZV33GSYroQCP8p7fyYjUVBE7BU"
        ]
      }
    },
    {
      "value": 0.02039242,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 65be988f0a457cf68203271536428698776f2c51 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91465be988f0a457cf68203271536428698776f2c5188ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1AGyaDKdHWo8TcGADUCWd8JYXMQrky8Uko"
        ]
      }
    }
  ],
</code></pre>

CC BY-SA 4.0
2018-07-26T00:25:51.433Z
2018-07-26T00:25:51.433Z
sizzlecookie
<p>I’m able to get the value for vout but my node is not returning the value for vin, how do I get the value for vin?</p>

<bitcoind>
bitcoind getrawtransaction has no value for vin, what am I doing wrong?
TerryP4321
# bitcoind getrawtransaction has no value for vin, what am I doing wrong?

(Asked by: username_0 on 2018-07-26)

I’m able to get the value for vout but my node is not returning the value for vin, how do I get the value for vin?

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2018-07-26. Score: 3 | Accepted answer

**Transaction inputs (vin's) are simply unspent transaction outputs of a previous transaction. Here's an example to help clarify:**

```
"vin": [
    {
      "txid": "6adf304f0a3e2afc92d864086202551041dfe0543f3116cc6f5c3b29e795fcaa",
      "vout": 1,
      "scriptSig": {
        "asm": "3044022079aca1fc033403856de39f03c856bf54b79efdaa210237a858d10675635e7b9e02206163547e0df9322fc337ab807f2874fbe1baec303bd874b3eb19c43a56b955ed[ALL] 0424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f",
        "hex": "473044022079aca1fc033403856de39f03c856bf54b79efdaa210237a858d10675635e7b9e02206163547e0df9322fc337ab807f2874fbe1baec303bd874b3eb19c43a56b955ed01410424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f"
      },
      "sequence": 4294967295
    },
    {
      "txid": "0047a70c729621f3b27897edc7a7a89c55d094b0241a91dd7a7a0fcd5351cbdd",
      "vout": 1,
      "scriptSig": {
        "asm": "30450220776842cd9d76924f0648ff434b64fef8739952684c184b4ce959ebfb2d9c9b3d022100fc101c92309a693a9fcf67c41efbb6c55483edc41d6fd66e3b3bbec7cc95fe88[ALL] 0424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f",
        "hex": "4830450220776842cd9d76924f0648ff434b64fef8739952684c184b4ce959ebfb2d9c9b3d022100fc101c92309a693a9fcf67c41efbb6c55483edc41d6fd66e3b3bbec7cc95fe8801410424140e929701fe8ad2b00e2f0995fa37357c3e0f67fa4061d387fa88f3b33f3834fec71063060de578c191cc7ab52fb5a095b72a6b692e5740fe2739ec1fcd9f"
      },
      "sequence": 4294967295
    }
  ],

```

**So to get the value for the first vin, you'll need to make another getrawtransaction call with txid: 6adf304f0a3e2afc92d864086202551041dfe0543f3116cc6f5c3b29e795fcaa**

**Then look for the 2nd vout output (since vout is 1, which means index 1). So the value will be 0.02039242:**

```
  "vout": [
    {
      "value": 0.02000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 27470c0fb0c4a68221f80bf01bf0e267a0a48d68 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91427470c0fb0c4a68221f80bf01bf0e267a0a48d6888ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "14agTvSiZV33GSYroQCP8p7fyYjUVBE7BU"
        ]
      }
    },
    {
      "value": 0.02039242,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 65be988f0a457cf68203271536428698776f2c51 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91465be988f0a457cf68203271536428698776f2c5188ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1AGyaDKdHWo8TcGADUCWd8JYXMQrky8Uko"
        ]
      }
    }
  ],

```


---

