<p>You're putting the locktime in the wrong place. You have</p>

<pre><code>"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01} 20"
</code></pre>

<p>but it should really be</p>

<pre><code>"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01}" 20
</code></pre>

<p>The locktime is a separate parameter, not part of the quoted parameter that has the transaction outputs. It goes outside of those quotes.</p>

CC BY-SA 4.0
2019-05-28T04:50:02.683Z
2019-05-28T04:50:02.683Z
Ava Chow
<p>If I add the CLocktime (e.g 20) at the end it always gives:</p>

<pre><code>Error: Error parsing JSON:{"12CxqQHzhFxCm2TkGkKHdFFPyUerFXcSte":0.008,"1DBDDvpcHv66LD7sWz1mCitPALW1qfrga7":0.012},
</code></pre>

<p>If I delete the CLocktime at the end it will be ok. 
Have anyone has similar experience and know why?</p>

CC BY-SA 4.0
2019-05-27T15:37:31.563Z
A nlocktime of 20 doesn’t make sense.
Claris
CC BY-SA 4.0
2019-05-27T20:01:45.617Z
This is the format I used, but not work:                                                  createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01} 20"
yrm23
CC BY-SA 4.0
2019-05-28T09:11:11.633Z
20 is still nonsense. It will always be valid because we are past block 20.
Claris
<transactions><locktime><createrawtransaction>
The nlocktime parameter in createrawtransaction seems not work using Bitcoin Core Wallet GUI
yrm23
# The nlocktime parameter in createrawtransaction seems not work using Bitcoin Core Wallet GUI

(Asked by: username_0 on 2019-05-27)

If I add the CLocktime (e.g 20) at the end it always gives:
Error: Error parsing JSON:{"12CxqQHzhFxCm2TkGkKHdFFPyUerFXcSte":0.008,"1DBDDvpcHv66LD7sWz1mCitPALW1qfrga7":0.012},

If I delete the CLocktime at the end it will be ok. 
Have anyone has similar experience and know why?

**Tags:** transactions, locktime, createrawtransaction

> **Comments:**
> **username_1**: A nlocktime of 20 doesn’t make sense.  
> **username_0**: This is the format I used, but not work:                                                  createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01} 20"  
> **username_1**: 20 is still nonsense. It will always be valid because we are past block 20.  

---

## 1 answers

### Answer by username_2 on 2019-05-28. Score: 2

You're putting the locktime in the wrong place. You have
"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01} 20"

but it should really be
"[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01, \"address\":0.01}" 20

The locktime is a separate parameter, not part of the quoted parameter that has the transaction outputs. It goes outside of those quotes.


---

