<p>You want the <code>getaddressinfo</code> wallet RPC. It will tell you whether an address is considers &quot;yours&quot;, along with various other information like whether you have the keys, whether it's a payment address or change, what its label is, and how it was derived.</p>

CC BY-SA 4.0
2020-12-15T23:35:39.640Z
Thanks, exactly what I was looking for. To any onlookers, the relevant part of the json response to `getaddressinfo` is 'ismine'
qmux
CC BY-SA 4.0
2020-12-15T23:14:50.413Z
2020-12-15T23:14:50.413Z
Pieter Wuille
<p>I have written a program where you can search for any address on Bitcoin Core whether the address is yours or not. Actually it'll give you all the addresses in every block if you want. Here is my github link:</p>
<p><a href="https://github.com/ORP967/Bitcoin_Core_RPC_par_address" rel="nofollow noreferrer">https://github.com/ORP967/Bitcoin_Core_RPC_par_address</a></p>
<p>Let me know what you guys think and any improvements you can come up with.</p>

CC BY-SA 4.0
2022-01-23T22:30:03.547Z
2022-01-23T22:30:03.547Z
ORP967
<p>I'm interested in knowing if there is an rpc method to determine whether or not an address was generated, and thus is owned by, a loaded Bitcoin Core wallet.</p>
<p>I have a few addresses that I generated a month or so ago using <code>getnewaddress</code>. These have been stored in a relatively secure encrypted location. In my paranoia, I am reluctant to now use the addresses to receive funds in the wallet, since as far as I know there is no benefit in doing so (besides increasing the gap between used addresses - but I am in no way approaching any gap limit, so this is irrelevant) over simply generating a new address which I can be sure is indeed owned by the loaded wallet. That said, I am curious to know if this is possible (since it may in some cases be useful, if sufficiently trustworthy - which if it were an rpc method for a trusted Bitcoin Corre instance, I'd assume to be the case) and after searching bitcoin.org RPC docs and on here, I have not been able to find an answer to this yet.</p>
<p>Note - I am aware of the <code>validateaddress</code> rpc, but as far as I understand, this only validates whether or not a Bitcoin address is valid, not whether it is associated with the loaded (or any particular) wallet.</p>

<bitcoin-core><bitcoin-cli>
How do I check if a particular address is 'owned' by a loaded wallet in Bitcoin Core?
qmux
# How do I check if a particular address is 'owned' by a loaded wallet in Bitcoin Core?

(Asked by: username_0 on 2020-12-15)

I'm interested in knowing if there is an rpc method to determine whether or not an address was generated, and thus is owned by, a loaded Bitcoin Core wallet.

I have a few addresses that I generated a month or so ago using `getnewaddress`. These have been stored in a relatively secure encrypted location. In my paranoia, I am reluctant to now use the addresses to receive funds in the wallet, since as far as I know there is no benefit in doing so (besides increasing the gap between used addresses - but I am in no way approaching any gap limit, so this is irrelevant) over simply generating a new address which I can be sure is indeed owned by the loaded wallet. That said, I am curious to know if this is possible (since it may in some cases be useful, if sufficiently trustworthy - which if it were an rpc method for a trusted Bitcoin Corre instance, I'd assume to be the case) and after searching bitcoin.org RPC docs and on here, I have not been able to find an answer to this yet.

Note - I am aware of the `validateaddress` rpc, but as far as I understand, this only validates whether or not a Bitcoin address is valid, not whether it is associated with the loaded (or any particular) wallet.

**Tags:** bitcoin-core, bitcoin-cli


---

## 2 answers

### Answer by username_1 on 2020-12-15. Score: 3 | Accepted answer

You want the `getaddressinfo` wallet RPC. It will tell you whether an address is considers "yours", along with various other information like whether you have the keys, whether it's a payment address or change, what its label is, and how it was derived.

> **Comments:**
> **username_0**: Thanks, exactly what I was looking for. To any onlookers, the relevant part of the json response to `getaddressinfo` is 'ismine'  

---

### Answer by username_2 on 2022-01-23. Score: 1

I have written a program where you can search for any address on Bitcoin Core whether the address is yours or not. Actually it'll give you all the addresses in every block if you want. Here is my github link:

<https://github.com/username_2/Bitcoin_Core_RPC_par_address>

Let me know what you guys think and any improvements you can come up with.


---

