<p>If you are trying to load a wallet, then you do not need to be using a wallet specific endpoint. <code>loadwallet</code> is not actually a wallet RPC so it does not need the wallet specific endpoint.</p>
<p>If you are trying to access a wallet that has already been loaded, then you have the wrong endpoint. The endpoint does not include the wallet.dat file. Bitcoin Core gives wallets names based on the directory that contains the wallet.dat file, and when it creates wallets, it puts them in directories of the name that was provided. The wallet RPC endpoints work similarly - they use just the wallet name. So the URL to access a particular wallet should actually be</p>
<pre><code>http://127.0.0.1/18332/wallet/another_wallet
</code></pre>
<p>Note that this URL does not have a trailing slash (<code>/</code>). If you have a trailing slash, then Bitcoin Core will incorrectly determine the wallet name to be <code>another_wallet/</code> where it is actually <code>another_wallet</code>.</p>

CC BY-SA 4.0
2021-04-30T16:49:54.150Z
I loaded this wallet `/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/`, then I try this url `http://127.0.0.1/18332/wallet/default_another_wallet` but says `Requested wallet does not exist or is not loaded`
Oleksandr IY
CC BY-SA 4.0
2021-04-30T17:00:12.723Z
You can use the `listwallets` command to see the wallets that are currently loaded. That will tell you what Bitcoin Core thinks the wallet name is.
Ava Chow
CC BY-SA 4.0
2021-04-30T17:03:48.367Z
here is [1] => /media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/
Oleksandr IY
CC BY-SA 4.0
2021-04-30T17:05:48.220Z
I tried different path combination, `bitcoin/testnet3/wallets/default_another_wallet`, `testnet3/wallets/default_another_wallet` .... and so on, every time can't find
Oleksandr IY
CC BY-SA 4.0
2021-04-30T17:08:27.570Z
When you load the wallet, instead of providing the full path to the wallet, just give the name `default_another_wallet`. The wallet is in the default walletdir for the datadir you have specified. There is no need to give the full path. Otherwise, Bitcoin Core is considering the wallet name to be the full path, i.e. `/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/`.
Ava Chow
CC BY-SA 4.0
2021-04-30T17:24:55.247Z
here is my `-walletdir=/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/ `
here is url `http://127.0.0.1:18332/wallet/default_another_wallet`
in walletdir I can see folder `default_another_wallet` but still that message that can't load wallet
Oleksandr IY
CC BY-SA 4.0
2021-04-30T17:28:09.287Z
Can you post exactly what you are trying to do and what the error message is? By exactly, I mean the exact JSON that you are sending, and the URL you are sending to. Which command are you trying to use that is giving you the error?
Ava Chow
CC BY-SA 4.0
2021-04-30T17:30:58.583Z
{"method":"getwalletinfo","params":[],"id":1}

http://127.0.0.1:18332/wallet/default_payout_wallet/

`Requested wallet does not exist or is not loaded`
Oleksandr IY
CC BY-SA 4.0
2021-04-30T18:25:15.620Z
What result to you get for `listwallets`?
Ava Chow
CC BY-SA 4.0
2021-04-30T18:26:16.533Z
Array
(
    [0] => 
    [1] => default_payout_wallet
)
Oleksandr IY
CC BY-SA 4.0
2021-04-30T18:30:41.790Z
very odd, I just tried from command line `curl --user myrpc01:password01 --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' 127.0.0.1:18332/wallet/default_payout_wallet
` and it worked well, but not with php script
Oleksandr IY
CC BY-SA 4.0
2021-04-30T18:34:54.463Z
Make sure your URL does not have a trailing slash (`/`). The URL should be `http://127.0.0.1:18332/wallet/default_payout_wallet`, not `http://127.0.0.1:18332/wallet/default_payout_wallet/`.
Ava Chow
CC BY-SA 4.0
2021-04-28T17:53:58.557Z
2021-04-30T18:35:48.207Z
2021-04-30T18:35:48.207Z
Ava Chow
<p>I need to perform rpc requests per wallet. Here is my url</p>
<pre><code>http://127.0.0.1:18332/wallet/another_wallet/wallet.dat
</code></pre>
<p>but I get error  <code>Requested wallet does not exist or is not loaded</code></p>
<p>I run daemon with this command</p>
<pre><code>bitcoind -daemon -rpcuser=myrpc01 -rpcpassword=password01 -testnet -datadir=/media/ax/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3
</code></pre>
<p>So what the wallet path I should set for correct load?</p>

CC BY-SA 4.0
2021-04-28T15:08:09.900Z
The `loadwallet` is (perhaps surprisingly) not a wallet RPC. It can be sent to the normal non-wallet-specific URL. Once loaded, the wallet-specific URL can be used to interact with it. Does that help you?
Pieter Wuille
<bitcoin-core><bitcoind>
Requested wallet does not exist or is not loaded
Oleksandr IY
# Requested wallet does not exist or is not loaded

(Asked by: username_0 on 2021-04-28)

I need to perform rpc requests per wallet. Here is my url

```
http://127.0.0.1:18332/wallet/another_wallet/wallet.dat

```

but I get error `Requested wallet does not exist or is not loaded`

I run daemon with this command

```
bitcoind -daemon -rpcuser=myrpc01 -rpcpassword=password01 -testnet -datadir=/media/ax/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3

```

So what the wallet path I should set for correct load?

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: The `loadwallet` is (perhaps surprisingly) not a wallet RPC. It can be sent to the normal non-wallet-specific URL. Once loaded, the wallet-specific URL can be used to interact with it. Does that help you?  

---

## 1 answers

### Answer by username_2 on 2021-04-28. Score: 2 | Accepted answer

If you are trying to load a wallet, then you do not need to be using a wallet specific endpoint. `loadwallet` is not actually a wallet RPC so it does not need the wallet specific endpoint.

If you are trying to access a wallet that has already been loaded, then you have the wrong endpoint. The endpoint does not include the wallet.dat file. Bitcoin Core gives wallets names based on the directory that contains the wallet.dat file, and when it creates wallets, it puts them in directories of the name that was provided. The wallet RPC endpoints work similarly - they use just the wallet name. So the URL to access a particular wallet should actually be

```
http://127.0.0.1/18332/wallet/another_wallet

```

Note that this URL does not have a trailing slash (`/`). If you have a trailing slash, then Bitcoin Core will incorrectly determine the wallet name to be `another_wallet/` where it is actually `another_wallet`.

> **Comments:**
> **username_0**: I loaded this wallet `/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/`, then I try this url `http://127.0.0.1/18332/wallet/default_another_wallet` but says `Requested wallet does not exist or is not loaded`  
> **username_2**: You can use the `listwallets` command to see the wallets that are currently loaded. That will tell you what Bitcoin Core thinks the wallet name is.  
> **username_0**: here is [1] => /media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/  
> **username_0**: I tried different path combination, `bitcoin/testnet3/wallets/default_another_wallet`, `testnet3/wallets/default_another_wallet` .... and so on, every time can't find  
> **username_2**: When you load the wallet, instead of providing the full path to the wallet, just give the name `default_another_wallet`. The wallet is in the default walletdir for the datadir you have specified. There is no need to give the full path. Otherwise, Bitcoin Core is considering the wallet name to be the full path, i.e. `/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/default_another_wallet/`.  
> **username_0**: here is my `-walletdir=/media/alex/6f6ceb40-fbbc-4959-b2b2-dbb1ae9ce24a/bitcoin/testnet3/wallets/ ` here is url `http://127.0.0.1:18332/wallet/default_another_wallet` in walletdir I can see folder `default_another_wallet` but still that message that can't load wallet  
> **username_2**: Can you post exactly what you are trying to do and what the error message is? By exactly, I mean the exact JSON that you are sending, and the URL you are sending to. Which command are you trying to use that is giving you the error?  
> **username_0**: {"method":"getwalletinfo","params":[],"id":1}  http://127.0.0.1:18332/wallet/default_payout_wallet/  `Requested wallet does not exist or is not loaded`  
> **username_2**: What result to you get for `listwallets`?  
> **username_0**: Array (     [0] =>      [1] => default_payout_wallet )  
> **username_0**: very odd, I just tried from command line `curl --user myrpc01:password01 --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' 127.0.0.1:18332/wallet/default_payout_wallet ` and it worked well, but not with php script  
> **username_2**: Make sure your URL does not have a trailing slash (`/`). The URL should be `http://127.0.0.1:18332/wallet/default_payout_wallet`, not `http://127.0.0.1:18332/wallet/default_payout_wallet/`.  

---

