<p>For one of our decentralized mobile wallet, We need to fetch balance of imported BTC address quickly.</p>
<p>After lot of research on google then I found Bitcoin deamon rpc command &quot;scantxoutset&quot;, which give unspent outputs of imported address.</p>
<p>The only problem with this command is that it takes more than a minute to return the response, which is too slow. User will not wait for 1 minute.</p>
<p>Anyone, could you please suggest me, is there any alternative to fetch the balance of imported BTC address quickly from the BTC node. ( not from any third party api)</p>
<p>Thanks.</p>

CC BY-SA 4.0
2020-10-02T16:05:02.587Z
`listunspent` is fast because it queries your own wallet, but it only works for addresses that are yours or otherwise imported (needing a very slow rescan first to find transactions that affect the wallet). `scantxoutset` queries the blockchain database, works for any address, but has to read through the database, so it's faster than rescanning.
Pieter Wuille
<bitcoin-core><bitcoind><bitcoin-core-development><scantxoutset>
Bitcoin "scantxoutset" rpc command return response too slow
Surinder kumar
# Bitcoin "scantxoutset" rpc command return response too slow

(Asked by: username_0 on 2020-10-01)

For one of our decentralized mobile wallet, We need to fetch balance of imported BTC address quickly.

After lot of research on google then I found Bitcoin deamon rpc command "scantxoutset", which give unspent outputs of imported address.

The only problem with this command is that it takes more than a minute to return the response, which is too slow. User will not wait for 1 minute.

Anyone, could you please suggest me, is there any alternative to fetch the balance of imported BTC address quickly from the BTC node. ( not from any third party api)

Thanks.

**Tags:** bitcoin-core, bitcoind, bitcoin-core-development, scantxoutset

> **Comments:**
> **username_1**: `listunspent` is fast because it queries your own wallet, but it only works for addresses that are yours or otherwise imported (needing a very slow rescan first to find transactions that affect the wallet). `scantxoutset` queries the blockchain database, works for any address, but has to read through the database, so it's faster than rescanning.  

---

## 0 answers

