I want to access unspent data of a specific bitcoin address.

I am trying this command

bitcoin-cli -regtest listunspent "some bitcoin address"

But I am always getting an empty list. I am using local bitcoind server on windows 7.

What should I do or use any function for getting desired output ?


listunspent only displays information about addresses which are currently part of your wallet. Bitcoin Core does not maintain indexes of unspent outputs for addresses you do not own, and will simply return a blank set if you attempt to query for them.


In order to get the list unspent of a specific bitcoin address( not belongs to your wallet), you must first import the address to wallet using importaddress This RPC does not require the private key of that address. Note that this will cause the program to rescan the entire blockchain, which will take several minutes.

now you can use the listunspent call to get the UTXO.

Edit: use rescan : true if you are importing already existing address

  • I tried this but didnt work. I get an empty result array when I run listunspent rpc call May 9 '20 at 0:44
  • Do you imported the address?
    – Akshay Dev
    May 10 '20 at 2:02
  • Yes I did. What happens is when I importeadress I get this response { result: null, error: null, id: 'd542c95d-ad8f-4a8e-b92f-6a69fa051e9d' } And then when I try to listunsent I get { result: [], error: null, id: '460bdaa4-5209-4dc8-ba76-582e3e0cc0e4' } May 10 '20 at 6:07
  • hi @JosephAkayesi, The response is totally fine. you should enable rescan option if the address already have some unspents. eg:bitcoin-cli importaddress "myaddress" "testing" true. You can reffer here : bitcoin.org/en/developer-reference#importaddress
    – Akshay Dev
    May 11 '20 at 12:08
  • Wow. I read that rescans can take forever. For my use case I need to be able to read unspent values in less than at least 10 secs May 12 '20 at 13:10

As mentioned here, you can first get the addresses of an account using getaddressesbyaccount and then list all the unspent of those addresses using

bitcoin-cli listunspent 6 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"  

where 6 and 9999999 are the min and max confirmations

  • 2
    OP is asking about arbitrary addresses, not just those in his wallet. Oct 31 '17 at 6:40
  • oh.. my mistake :) hope this might help people who are looking to get unspent from the wallet addresses.
    – RealSteel
    Nov 3 '17 at 7:04

Assuming the addresses are in your wallet, you're looking for listreceivedbyaddress. That will give you back this:

Returns an array of objects containing:

  • "address" : receiving address
  • "account" : the account of the receiving address
  • "amount" : total amount received by the address
  • "confirmations" : number of confirmations of the most recent transaction included
  • "txids" : a list of transaction IDs that you can pass to gettransaction in order to see the full transaction.


  • Yup, But if i want to get unspents of an address which is not a part of my wallet ? than what function should i use ? @Nick Apr 27 '15 at 17:54
  • 2
    @HassanMehmood Doesn't exist. Use bitcoin-abe or electrum server or blockchain.info instead.
    – Nick ODell
    Apr 27 '15 at 18:22
  • Hey, from answers, I added one my multisig add using this command "addmultisigaddress". and sent some satoshis to this address. but I am still getting empty list after calling :listunspent" ??? Apr 29 '15 at 15:31
  • @HassanMehmood You need to rerun with rescan. bitcoin.stackexchange.com/questions/22199/…
    – Nick ODell
    Apr 29 '15 at 18:21
  • 1
    addmultisigaddress is not enough to make the wallet treat the address as its own; you also need to have all of the private keys. If you want to treat an address as yours regardless of keys, use importaddress. Oct 31 '17 at 6:39

Unspent data appears in Unspent List only after SIX confirmations.

Try this command,

bitcoin-cli -regtest listunspent "some bitcoin address" 0

It will show all the unspent transactions.

  • I am running the same command but getting empty list in response. I first generated and added a multisig address using "addultisigaddress" command and call listunspent. But in result i always get an empty list though I sent some satoshis to this address 2 times Apr 29 '15 at 17:40

Other options, beyond what Nick mentioned, are to either use the toshi.io API:

toshi.io - API - utxo's for address

Or run your own toshi node:


  • chain.com is also very good and easy to use! but i was trying not to use any 3rd party APIs. Apr 29 '15 at 7:57
  • @HassanMehmood if running the toshi node locally isn't something you want either (it consumes well over 200GB of space) then you could run bitcoin core with txindex enabled. You'd then have to parse the blockchain and build and keep up a database of utxo yourself. As others have pointed out, if you just want a bitcoin-cli argument for this, it doesn't exist. Apr 30 '15 at 22:17

I have written a program that allows you to search for any address whether it belongs to your wallet or not, in Python3.

Here is the github link:


Let me know if you guys have any improvements that can be made to it.

New contributor
ORP967 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.