<p>The problem is, you should to escape the inner quotes:</p>

<pre><code>lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"
</code></pre>

CC BY-SA 4.0
2018-10-02T14:08:53.717Z
Thanks. But it's not work. If with bitcoin-cli, your format should be work. But my problem is how to use is with bitcoin core wallet console. It seems that don't need to escape the inner quotes for console.
yrm23
CC BY-SA 4.0
2018-10-02T14:27:42.843Z
It should work, have you tried?
MCCCS
CC BY-SA 4.0
2018-10-02T14:37:32.930Z
10:37:01
￼
lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"


10:37:01
￼
Invalid parameter, expected unspent output (code -8)
yrm23
CC BY-SA 4.0
2020-04-11T14:17:24.003Z
@yrm23 It's clearly not unspent.
Ken Sharp
CC BY-SA 4.0
2018-10-02T13:49:27.273Z
2018-10-02T13:49:27.273Z
MCCCS
<p>Try double quoting</p>

<pre><code>lockunspent false '[{"\"txid\"":"\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\"","\"vout\"":"0"}]'
</code></pre>

CC BY-SA 4.0
2019-04-11T18:48:36.830Z
please explain why this is down voted
mikeytown2
CC BY-SA 4.0
2019-03-27T00:15:29.727Z
2019-03-27T00:15:29.727Z
mikeytown2
<p>Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer. </p>

<p>My input is: </p>

<pre><code>lockunspent false "[{"txid":"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c","vout":0}]"
</code></pre>

<p>Is anyone can teach me where I am wrong? Thanks </p>

CC BY-SA 4.0
2018-11-04T18:30:16.780Z
What is the error that you get?
Ava Chow
<wallet><json-rpc>
How to use "lockunspent" in bitcoin core wallet console?
yrm23
# How to use "lockunspent" in bitcoin core wallet console?

(Asked by: username_0 on 2018-10-02)

Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer. 
My input is: 
lockunspent false "[{"txid":"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c","vout":0}]"

Is anyone can teach me where I am wrong? Thanks

**Tags:** wallet, json-rpc

> **Comments:**
> **username_1**: What is the error that you get?  

---

## 2 answers

### Answer by username_2 on 2018-10-02. Score: 1

The problem is, you should to escape the inner quotes:
lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"

> **Comments:**
> **username_0**: Thanks. But it's not work. If with bitcoin-cli, your format should be work. But my problem is how to use is with bitcoin core wallet console. It seems that don't need to escape the inner quotes for console.  
> **username_2**: It should work, have you tried?  
> **username_0**: 10:37:01 ￼ lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"   10:37:01 ￼ Invalid parameter, expected unspent output (code -8)  
> **username_3**: @username_0 It's clearly not unspent.  

---

### Answer by username_4 on 2019-03-27. Score: -1

Try double quoting
lockunspent false '[{"\"txid\"":"\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\"","\"vout\"":"0"}]'

> **Comments:**
> **username_4**: please explain why this is down voted  

---

