<p>Whatever tool you are using is likely unable to validate segwit transactions, and thus thinks that your inputs are not formed correctly. It's probably just backed by a node that wasn't upgraded (I believe insight does not have a patched version for segwit support yet)</p>

<p>Try using a tool like <a href="https://blockchain.info/pushtx" rel="nofollow noreferrer">https://blockchain.info/pushtx</a></p>

CC BY-SA 4.0
2018-06-05T12:27:55.777Z
2018-06-05T12:27:55.777Z
Raghav Sood
<p>The transaction you're trying to send spends from an segwit input, but BitPay Insight does not currently support segwit.  On segwit-supporting software, the transaction is valid:</p>

<pre><code> $ bitcoin-cli testmempoolaccept '["010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000"]'
 [
   {
     "txid": "e4fdf857b97f1d41c277ffab61dd1367774311303db982d42f7f80e4baa4105a",
     "allowed": true
   }
]
</code></pre>

<p>If you just need your transaction broadcast, feel free to reply to this answer in a comment and I'll send it for you.</p>

CC BY-SA 4.0
2018-06-05T12:50:16.767Z
Tnx for answer.
ItsMyLife
CC BY-SA 4.0
2018-06-05T12:23:58.357Z
2018-06-05T12:23:58.357Z
David A. Harding
<p>I am trying to push a raw transaction via BTC insight API, but I always get an error message:</p>

<blockquote>
  <p>16: bad-txns-vin-empty. Code:-26</p>
</blockquote>

<p>Here is the raw transaction hex:</p>

<pre><code>010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000
</code></pre>

<transactions><segregated-witness><raw-transaction><broadcast><insight-api>
16: bad-txns-vin-empty. Code:-26
ItsMyLife
# 16: bad-txns-vin-empty. Code:-26

(Asked by: username_0 on 2018-06-05)

I am trying to push a raw transaction via BTC insight API, but I always get an error message:

16: bad-txns-vin-empty. Code:-26

Here is the raw transaction hex:
010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000

**Tags:** transactions, segregated-witness, raw-transaction, broadcast, insight-api


---

## 2 answers

### Answer by username_2 on 2018-06-05. Score: 4 | Accepted answer

The transaction you're trying to send spends from an segwit input, but BitPay Insight does not currently support segwit.  On segwit-supporting software, the transaction is valid:
 $ bitcoin-cli testmempoolaccept '["010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000"]'
 [
   {
     "txid": "e4fdf857b97f1d41c277ffab61dd1367774311303db982d42f7f80e4baa4105a",
     "allowed": true
   }
]

If you just need your transaction broadcast, feel free to reply to this answer in a comment and I'll send it for you.

> **Comments:**
> **username_0**: Tnx for answer.  

---

### Answer by username_1 on 2018-06-05. Score: 0

Whatever tool you are using is likely unable to validate segwit transactions, and thus thinks that your inputs are not formed correctly. It's probably just backed by a node that wasn't upgraded (I believe insight does not have a patched version for segwit support yet)

Try using a tool like <https://blockchain.info/pushtx>


---

