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

<p>You might have to play around with the exact form, I suspect it might be <code>&lt;host:port&gt;/wallet/wallets/walletA</code> in your case, or <code>&lt;host:port&gt;/wallets/walletA</code>, or <code>&lt;host:port&gt;/wallet/walletA</code>.</p>

CC BY-SA 4.0
2019-09-21T13:57:54.690Z
I have been unable to make this work. Maybe because I'm on Windows with backslahes in paths. I tried *everything*: url encoding, escaping backslahes, etc. I even looked at Bitcoin code, and I'm not sure paths are properly managed when following `/wallet/` in urls! In the end, I decided to use the `walletdir` config in `bitcoin.conf`in order to specify the directory where wallets will be created. And I only use the name of a wallet (no path) in the RPC `/wallet/[wallet_name]` url. This works. Hope it helps someone, one day.
electrotype
CC BY-SA 4.0
2019-09-21T00:37:53.867Z
2019-09-21T00:37:53.867Z
Raghav Sood
<p>I'm very new to Bitcoin development, using its RPC API.</p>

<p>I created a wallet using </p>

<pre><code>{
    "method": "createwallet",
    "params": {
        "wallet_name": "/wallets/walletA"
    }
}
</code></pre>

<p>Now I want to get info about this wallet. I try to use the <code>getwalletinfo</code> command.</p>

<p>But it seems you can't specify the wallet <em>name</em>/<em>path</em> when running this command? You have to "load" the wallet first (using <code>loadwallet</code>)?</p>

<p>This is the part I do not understand. Let's say I have created 10 wallets and I try to run a <code>getwalletinfo</code> command in a multithreaded environment... How can I make sure I target the right wallet? Do I really have to send a <code>loadwallet</code> request to specify the wallet I want to work on, before getting info about it?</p>

<p>What will occure if I want to get information about "walletA" so I run <code>loadwallet walletA</code>, but before I can run <code>getwalletinfo</code> to get its info, a <code>loadwallet walletB</code> request is made?</p>

CC BY-SA 4.0
2023-07-11T08:16:40.560Z
did you find any solution . im stuck in sending transaction from the specific account address .
Ahmad
<bitcoin-core><bitcoind>
Targetting a specific wallet when sending commands using RPC commands to bitcoind
electrotype
# Targetting a specific wallet when sending commands using RPC commands to bitcoind

(Asked by: username_0 on 2019-09-21)

I'm very new to Bitcoin development, using its RPC API.

I created a wallet using

```
{
    "method": "createwallet",
    "params": {
        "wallet_name": "/wallets/walletA"
    }
}

```

Now I want to get info about this wallet. I try to use the `getwalletinfo` command.

But it seems you can't specify the wallet *name*/*path* when running this command? You have to "load" the wallet first (using `loadwallet`)?

This is the part I do not understand. Let's say I have created 10 wallets and I try to run a `getwalletinfo` command in a multithreaded environment... How can I make sure I target the right wallet? Do I really have to send a `loadwallet` request to specify the wallet I want to work on, before getting info about it?

What will occure if I want to get information about "walletA" so I run `loadwallet walletA`, but before I can run `getwalletinfo` to get its info, a `loadwallet walletB` request is made?

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: did you find any solution . im stuck in sending transaction from the specific account address .  

---

## 1 answers

### Answer by username_2 on 2019-09-21. Score: 1

When more than one wallet is available, the wallet is selected by sending the RPC requests to `<host:port>/wallet/<wallet_name>`.

You might have to play around with the exact form, I suspect it might be `<host:port>/wallet/wallets/walletA` in your case, or `<host:port>/wallets/walletA`, or `<host:port>/wallet/walletA`.

> **Comments:**
> **username_0**: I have been unable to make this work. Maybe because I'm on Windows with backslahes in paths. I tried *everything*: url encoding, escaping backslahes, etc. I even looked at Bitcoin code, and I'm not sure paths are properly managed when following `/wallet/` in urls! In the end, I decided to use the `walletdir` config in `bitcoin.conf`in order to specify the directory where wallets will be created. And I only use the name of a wallet (no path) in the RPC `/wallet/[wallet_name]` url. This works. Hope it helps someone, one day.  

---

