I'm building a website which will allow every user to make deposits and transact with Bitcoin, how will I be able to get the balance of a specific wallet. I currently know these commands:


But to get the wallet info of that specific wallet is confusing for me, according to the documentation the getwalletinfo RPC takes no parameters. So my question is how do you get wallet information of a specific wallet?


If you are using more than one wallet, the wallet is selected by sending the RPC requests to <host:port>/wallet/<wallet_name>.

  • how would that look in PHP?
    – frogman578
    Jul 27 '19 at 12:00
  • 1
    I don't do PHP, but it should just be a matter of update the URL you are sending the request to so that it includes the wallet path. Jul 27 '19 at 13:14
  • I tried to run this in command line: bitcoin-cli getwalletinfo "home/username/bitcoin/wallets/testwallet" which returns an error code
    – frogman578
    Jul 28 '19 at 21:20
  • Just for clarification, my OS is linux
    – frogman578
    Jul 28 '19 at 21:20
  • If you are using bitcoin-cli, you need to set the -rpcwallet=<wallet_name> parameter - the url based selection is for applications using the RPC interface directly Jul 28 '19 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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