<p>BitcoinRPC class from here (ruby): <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)</a></p>

<p>btc = BitcoinRPC.new("<a href="http://rpcuser:rpcpassword@127.0.0.1:18332" rel="nofollow noreferrer">http://rpcuser:rpcpassword@127.0.0.1:18332</a>")</p>

<p>btc.getaddress    => "2NCixvAERq3eDt31jM7eYATGiHdTEcizQkj"     THIS WORKS</p>

<p>arguments =  { action: 'start', scanobjects: ["addr(mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4)"] }.to_json</p>

<p>btc.scantxoutset(arguments)  => BitcoinRPC::JSONRPCError: {"code"=>-8, "message"=>"Invalid command"}   Doesn't work...</p>

CC BY-SA 4.0
2019-08-20T20:02:48.087Z
what version of Bitcoin Core are you running?
JBaczuk
CC BY-SA 4.0
2019-08-20T20:03:47.030Z
I'm using version 0.18.0

$ bitcoin-cli --version
Bitcoin Core RPC client version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65
Copywright
CC BY-SA 4.0
2019-08-20T20:24:24.507Z
I'm not a ruby guy, but perhaps the arguments are the wrong format. Have you tried 2 different arguments? The first is just a string "start" and the second is the json-stringified array?
JBaczuk
CC BY-SA 4.0
2021-08-24T19:17:43.753Z
This is old but did you try changing ["addr(mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4)"]. to. ["addr('mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4')"]
ruby_newbie
<bitcoind><json-rpc><scantxoutset>
Using scantxouset method on bitcoind JSON RPC
Copywright
# Using scantxouset method on bitcoind JSON RPC

(Asked by: username_0 on 2019-08-20)

BitcoinRPC class from here (ruby): <https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)>

btc = BitcoinRPC.new("<http://rpcuser:rpcpassword@127.0.0.1:18332>")

btc.getaddress => "2NCixvAERq3eDt31jM7eYATGiHdTEcizQkj" THIS WORKS

arguments = { action: 'start', scanobjects: ["addr(mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4)"] }.to\_json

btc.scantxoutset(arguments) => BitcoinRPC::JSONRPCError: {"code"=>-8, "message"=>"Invalid command"} Doesn't work...

**Tags:** bitcoind, json-rpc, scantxoutset

> **Comments:**
> **username_1**: what version of Bitcoin Core are you running?  
> **username_0**: I'm using version 0.18.0  $ bitcoin-cli --version Bitcoin Core RPC client version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65  
> **username_1**: I'm not a ruby guy, but perhaps the arguments are the wrong format. Have you tried 2 different arguments? The first is just a string "start" and the second is the json-stringified array?  
> **username_2**: This is old but did you try changing ["addr(mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4)"]. to. ["addr('mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4')"]  

---

## 0 answers

