<p>You can use the <code>scantxoutset</code> command to scan for unspent outputs for a given address (or script). </p>

<p>Importing an address adds it to your wallet, and you will see transactions for imported addresses under the <code>listreceivedbyaddress</code> and <code>listtransactions</code> commands.</p>

CC BY-SA 4.0
2020-05-14T09:14:29.897Z
2020-05-14T09:14:29.897Z
Raghav Sood
<p>I have setup Bitcoin core and trying build an API to fetch all transactions under an address ( not in my wallet ).</p>

<p><a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importaddress/" rel="nofollow noreferrer">Bitcoin core RPC documention</a> says that an address which is not in my wallet needs to be imported. So I did the same using <code>importaddress</code> while setting rescan true e.g. <code>importaddress '35z3Re9SgLHBfeg7y1HdR35t9HrTqTsKFV' 'test' true</code>. It took more than a week to rescan the whole blockchain database. </p>

<p>After importing the address, when I issued the <a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getaddressinfo/" rel="nofollow noreferrer"><code>getaddressinfo</code></a> RPC command I got empty set of transactions in response.</p>

<p>Am I missing something ? Can you please help me here with the steps ?    </p>

CC BY-SA 4.0
2020-05-14T06:01:39.450Z
`getaddressinfo` doesn't return transaction information.
Ava Chow
<bitcoin-core><blockchain><bitcoind><bitcoin-cli>
Is there any method to extract transactions for an bitcoin address which is not in my wallet using bitcoin core?
rt2786
# Is there any method to extract transactions for an bitcoin address which is not in my wallet using bitcoin core?

(Asked by: username_0 on 2020-05-14)

I have setup Bitcoin core and trying build an API to fetch all transactions under an address ( not in my wallet ).

[Bitcoin core RPC documention](https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importaddress/) says that an address which is not in my wallet needs to be imported. So I did the same using `importaddress` while setting rescan true e.g. `importaddress '35z3Re9SgLHBfeg7y1HdR35t9HrTqTsKFV' 'test' true`. It took more than a week to rescan the whole blockchain database.

After importing the address, when I issued the [`getaddressinfo`](https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getaddressinfo/) RPC command I got empty set of transactions in response.

Am I missing something ? Can you please help me here with the steps ?

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

> **Comments:**
> **username_1**: `getaddressinfo` doesn't return transaction information.  

---

## 1 answers

### Answer by username_2 on 2020-05-14. Score: 1

You can use the `scantxoutset` command to scan for unspent outputs for a given address (or script).

Importing an address adds it to your wallet, and you will see transactions for imported addresses under the `listreceivedbyaddress` and `listtransactions` commands.


---

