In core 0.17 they allow a user to dynamically specify wallets for things like getbalance. So with bitcoin-cli --wallaet='foo' getbalance

But I can't actually figure out how to do this with JSON RPC/ curl? It doesn't seem to work as a parameter or in the --data portion for curl. Can someone help point to how this gets included with an RPC or curl call? Thank you in advance.

1 Answer 1


with bitcoin-cli --wallaet='foo' getbalance

I think you're referring to the -rpcwallet flag.


The flag changes the endpoint. Try changing the url of the curl call to:



curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.