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

CC BY-SA 4.0
2019-07-27T12:00:34.370Z
how would that look in PHP?
frogman578
CC BY-SA 4.0
2019-07-27T13:14:16.727Z
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.
Raghav Sood
CC BY-SA 4.0
2019-07-28T21:20:15.630Z
I tried to run this in command line: `bitcoin-cli getwalletinfo "home/username/bitcoin/wallets/testwallet"` which returns an `error code`
frogman578
CC BY-SA 4.0
2019-07-28T21:20:31.733Z
Just for clarification, my OS is linux
frogman578
CC BY-SA 4.0
2019-07-28T21:28:33.870Z
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
Raghav Sood
CC BY-SA 4.0
2019-07-28T21:36:26.450Z
so if i were to use it via my application i'd still have to have that in the `bitcoin.conf`?
frogman578
CC BY-SA 4.0
2019-07-28T21:37:29.957Z
The bitcoin folder and their wallets aren't located within the server directory
frogman578
CC BY-SA 4.0
2019-07-29T18:53:55.253Z
again how do I do it in the url when my bitcoin sevrer isn't located within my web server?
frogman578
CC BY-SA 4.0
2019-07-27T11:59:54.807Z
2019-07-27T11:59:54.807Z
Raghav Sood
<p>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:</p>

<p><code>$bitcoin-&gt;createwallet("wallet_name");</code></p>

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

<wallet><json-rpc><website-integration>
Wallet management now that accounts are deprecated?
frogman578
# Wallet management now that accounts are deprecated?

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

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:

`$bitcoin->createwallet("wallet_name");`

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?

**Tags:** wallet, json-rpc, website-integration


---

## 1 answers

### Answer by username_1 on 2019-07-27. Score: 2

If you are using more than one wallet, the wallet is selected by sending the RPC requests to `/wallet/`.

> **Comments:**
> **username_0**: how would that look in PHP?  
> **username_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.  
> **username_0**: I tried to run this in command line: `bitcoin-cli getwalletinfo "home/username/bitcoin/wallets/testwallet"` which returns an `error code`  
> **username_0**: Just for clarification, my OS is linux  
> **username_1**: 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  
> **username_0**: so if i were to use it via my application i'd still have to have that in the `bitcoin.conf`?  
> **username_0**: The bitcoin folder and their wallets aren't located within the server directory  
> **username_0**: again how do I do it in the url when my bitcoin sevrer isn't located within my web server?  

---

