Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
7 years, 11 months ago
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 ?
Apr 27, 2015 at 15:43
Hassan Mehmood Hassan Mehmood
213 1 1 gold badge 2 2 silver badges 6 6 bronze badges
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.
Apr 27, 2015 at 15:57
15.3k 2 2 gold badges 25 25 silver badges 43 43 bronze badges
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
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. importaddress
now you can use the listunspent call to get the UTXO.
Edit: use rescan : true if you are importing already existing address
Oct 9, 2018 at 11:34
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
Oct 31, 2017 at 4:22
179 1 1 silver badge 9 9 bronze badges
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.
Apr 27, 2015 at 17:30
Nick ODell Nick ODell
29k 11 11 gold badges 67 67 silver badges 128 128 bronze badges
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.
Apr 28, 2015 at 18:04
633 6 6 silver badges 15 15 bronze badges
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.
Jan 23, 2022 at 22:40
31 1 1 bronze badge
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only