Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: GRWer on November 26, 2014, 03:08:20 AM



Title: How do i get UTXO of any address ?
Post by: GRWer on November 26, 2014, 03:08:20 AM
Hey guys,

I already knew blockchaininfo provide this feature (https://blockchain.info/unspent?address=) .

I wanna know are there other simple ways to get UTXO of any address  ?  

Thanks :)


Title: Re: How do i get UTXO of any address ?
Post by: dexX7 on November 26, 2014, 05:59:45 AM
I once build a tool for this, but with the goal in mind of reducing UTXO "bloat" from meta protocols. Maybe this is of help for you nevertheless? You should probably remove the value filter which is set to [0.00000546, 0.00018] BTC as per default via "Settings":

http://redeem.bitwatch.co/

It's build on https://github.com/dexX7/bitcoin/commits/master-addrindex-extended (last update three months ago). Another maintainer of such a project is jmcorgan: https://github.com/jmcorgan/bitcoin/tree/addrindex. All credit go to sipa for his original proposal: https://github.com/bitcoin/bitcoin/pull/2802


Title: Re: How do i get UTXO of any address ?
Post by: GRWer on November 26, 2014, 06:32:14 AM
I once build a tool for this, but with the goal in mind of reducing UTXO "bloat" from meta protocols. Maybe this is of help for you nevertheless? You should probably remove the value filter which is set to [0.00000546, 0.00018] BTC as per default via "Settings":

http://redeem.bitwatch.co/

It's build on https://github.com/dexX7/bitcoin/commits/master-addrindex-extended (last update three months ago). Another maintainer of such a project is jmcorgan: https://github.com/jmcorgan/bitcoin/tree/addrindex. All credit go to sipa for his original proposal: https://github.com/bitcoin/bitcoin/pull/2802


Edit: there is also http://api.bitwatch.co/ for some really not-so-awesome-API. :)

Hey , thanks for you instruction : )

btw: I find bitpay 's insight project  <--- https://github.com/bitpay/insight-api/blob/master/README.md -->  which has a utxo api for any address . I will try to deploy it myself : )

thanks anyway


Title: Re: How do i get UTXO of any address ?
Post by: dexX7 on November 26, 2014, 01:59:34 PM
May I ask what kind of UTXOs your looking for?

If you're looking for an API, there is also:

https://chain.com/docs#bitcoin-address-unspents (example (https://api.chain.com/v2/bitcoin/addresses/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr/unspents?api-key-id=DEMO-4a5e1e4))
https://toshi.io/docs/#get-address-unspent-outputs (example (https://bitcoin.toshi.io/api/v0/addresses/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr/unspent_outputs))
http://btc.blockr.io/documentation/api (example (http://btc.blockr.io/api/v1/address/unspent/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr?unconfirmed=1&multisigs=1))

Edit: since you mentioned Insight:

https://github.com/bitpay/insight
https://github.com/coinbase/toshi
https://github.com/spesmilo/sx + https://github.com/libbitcoin/obelisk
https://github.com/bitcoin-abe/bitcoin-abe (I think this should be work as well, but I'm not really familiar with it)


Title: Re: How do i get UTXO of any address ?
Post by: GRWer on November 26, 2014, 02:55:27 PM
May I ask what kind of UTXOs your looking for?

If you're looking for an API, there is also:

https://chain.com/docs#bitcoin-address-unspents (example (https://api.chain.com/v2/bitcoin/addresses/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr/unspents?api-key-id=DEMO-4a5e1e4))
https://toshi.io/docs/#get-address-unspent-outputs (example (https://bitcoin.toshi.io/api/v0/addresses/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr/unspent_outputs))
http://btc.blockr.io/documentation/api (example (http://btc.blockr.io/api/v1/address/unspent/1Pa6zyqnhL6LDJtrkCMi9XmEDNHJ23ffEr?unconfirmed=1&multisigs=1))

Edit: since you mentioned Insight:

https://github.com/bitpay/insight
https://github.com/coinbase/toshi
https://github.com/spesmilo/sx + https://github.com/libbitcoin/obelisk
https://github.com/bitcoin-abe/bitcoin-abe (I think this should be work as well, but I'm not really familiar with it)

Thanks so much : )


I 've deployed insight on my VPS today  , but find  60G disk VPS still can't hold the whole Blockchain file which constructed by insight   :o So , Is there a lighter version of bitcoin block explorer ?

Anyway , insight API works well ; )  <---- https://insight.bitpay.com/api/addr/19RXkQcKxXb3SgvRA5LsKDd5B2Sp1ZCMZV/utxo .

edit: i need utxo to construct transactions for multisig addresses , but " ./bitcoind listunspent " doesn't work on multisig address ... lol


Title: Re: How do i get UTXO of any address ?
Post by: dexX7 on November 26, 2014, 07:06:59 PM
If you are familiar with compiling Bitcoin and so, you may also take a look at:

https://github.com/bitcoin/bitcoin/pull/5048

The "addrindex" branch (first post) currently requires about 37 GB on mainnet, but this one is fully optimized for the purpose of getting unspent outputs of any address, so it should be less. Given the amount of responses and activity on GitHub, it should be solid.

Otherwise I suggest to use one of the APIs. Especially chain.com aims to be a reliable, ready-for-production data provider.