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)


  • Not sure why it takes time. listunspent can also be used to get balance of imported address. Example: listunspent 1 9999999 "[\"tb1qyf69xlfvmm6s7a9rtjap2vdnfdmalp6zqutg73\"]" Also if its slow because of lot of addresses or something else maybe you can manage the UX in a way that user can do something else while this is being done in the background.
    – user103136
    Oct 1, 2020 at 22:52
  • 2
    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. Oct 2, 2020 at 16:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.