<p>I ended up writing my own command-line tool to perform wallet discovery and print out a report.</p>

<p>It supports single xpub derivation as well as multisig m-of-n wallets, specifically CoPay wallets.</p>

<p>It determines if each address has been used or not by querying blockchain.info or also toshi or insight servers (the latter two can be run locally.)</p>

<p>Anyone interested can check it out at:
<a href="https://github.com/dan-da/hd-wallet-addrs" rel="nofollow">https://github.com/dan-da/hd-wallet-addrs</a></p>

<p><strike>I plan to add a web frontend soon.</strike>  Update: Web frontend is <a href="https://mybitprices.info/hd-wallet-addrs.html" rel="nofollow">here</a>.</p>

<p>Also, blockonomics is pretty good and very fast.  They don't seem to support CoPay/multisig yet though.</p>

CC BY-SA 3.0
2016-01-01T01:24:41.300Z
2016-02-05T01:47:48.700Z
2016-02-05T01:47:48.700Z
danda
<p>I have 3 ways I go about this:</p>

<ol>
<li><a href="https://github.com/libbitcoin/libbitcoin-explorer" rel="nofollow">BX tool</a> by libbitcoin</li>
<li>Python libraries, namely <em><a href="https://github.com/vbuterin/pybitcointools" rel="nofollow">pybitcointools</a></em> ...</li>
<li>and <em><a href="https://github.com/richardrkiss/pycoin" rel="nofollow">PyCoin</a></em></li>
</ol>

<p>Both have a CLI interface, though <em>PyCoin</em> is more comprehensive. The address scanning is something that can be achieved with <a href="https://github.com/simcity4242/pybitcointools" rel="nofollow">this pybitcointools fork</a>.</p>

<p>You'll need to clarify your preferences in terms of shell/OS/programming language for me to detail this specifically. If you're comfortable with pybitcointools I can detail that.</p>

CC BY-SA 3.0
2015-07-31T06:21:37.263Z
@danda I will detail the method which best suits your situation, so take a look at these options and chime in on your preference. I can detail them all, if needs be.
Wizard Of Ozzie
CC BY-SA 3.0
2015-07-31T18:25:41.137Z
linux / php CLI.    After more investigation it looks like https://github.com/Bit-Wasp/bitcoin-lib-php is probably my best bet, and also doing it locally  keeps the xpub private vs calling an online service.
danda
CC BY-SA 3.0
2015-07-31T06:20:50.730Z
2015-07-31T06:26:27.240Z
2015-07-31T06:26:27.240Z
Wizard Of Ozzie
<p>You can search xpubs using <a href="https://www.blockonomics.co/views/api.html" rel="nofollow">blockonomics api</a> .Would return both main chain and change addreses along with their balance</p>

CC BY-SA 3.0
2016-04-20T22:30:21.670Z
They must have removed that option because their docs say nothing about xpubs
priestc
CC BY-SA 3.0
2016-04-21T04:42:45.937Z
its does actually https://www.blockonomics.co/views/faqs.html (How to search HD wallet)
dark knight
CC BY-SA 3.0
2015-11-03T06:11:47.967Z
2015-11-03T06:11:47.967Z
dark knight
<p>Goochain web service does exactly what you request:
It provides addresses used listing of the wallet. It doesn't have access to the private keys.
Just input xpub... in search field, and it would display all transaction on any BIP32 and BIP44 derived addresses.</p>

<p>goochain.net</p>

<p>This is not API but a web service. </p>

CC BY-SA 3.0
2015-07-31T18:18:18.500Z
hmm, goochain looks like they have the functionality but I see no way to programmatically call their service, so it doesn't solve my problem.  Also it is not clear to me if they find change addresses, which I need.
danda
CC BY-SA 3.0
2015-08-01T22:32:11.610Z
This is only a web service that provides basic accounting and transaction history. Goochain displays all used addresses from a xpub.
It displays change and payment addresses (/0 and /1), additionally it searches on the direct chain (so you can provide xpub for any branch)
antonio-fr
CC BY-SA 3.0
2015-07-31T13:58:09.363Z
2015-07-31T13:58:09.363Z
antonio-fr
<p>Try <a href="https://goochain.net/wallet/" rel="nofollow noreferrer">Goochain's Watch-Only Wallet Services</a> for BIP32 addresses created via Ledger, Trezor, or Mycelium. Based on the xpub, their tool only returns addresses that have been used on-chain previously.</p>

CC BY-SA 3.0
2016-11-09T11:47:53.030Z
2016-11-09T11:47:53.030Z
cbinrva
<p><a href="https://samouraiwallet.com/sentinel.html" rel="nofollow noreferrer">https://samouraiwallet.com/sentinel.html</a></p>

<p>Samourai wallet has another app called Sentinel which is a watch-only bitcoin wallet. The app does not handle private keys for spending (aside from sweeping). Sentinel provides transaction, balance, and receive addresses for each public key provided.</p>

CC BY-SA 3.0
2018-03-08T14:18:39.447Z
2018-03-08T14:18:39.447Z
KryptoKidz
<p>I need this for a tool i'm writing that generates a transaction history report.   think:  accounting, auditing, etc.   The tool does not and should not have access to the private keys.</p>

<p>Ideally, the API would:</p>

<ol>
<li>not require creating a wallet first.  I only need it to derive keys.</li>
<li>return only addresses that have been used (received funds), up to the gap defined in bip44.</li>
</ol>

<p>Alternatively, are there any command-line tools that can do this?</p>

CC BY-SA 3.0
2016-01-02T13:58:54.527Z
I have created a 2of3 wallet on Coinbase. I have 3 different xpub. I tried all 3 xpub on goochain.net but in all appear 0 balance. But I have 2 btc.
How to monitor the 2of3 of coinbase using xpub?
Leonardo
CC BY-SA 3.0
2016-01-03T18:28:47.603Z
@Leonardo, that sounds like the beginnings of a good question, perhaps you should ask a separate question! The field you entered in before is for answers, not questions. Does coinbase show you an address that starts with a '3' somewhere? That's where the 2-of-3 coins should be held.
morsecoder
<bip32-hd-wallets><bip44>
Is there any service/api for deriving HD wallet addresses from a master public key?
danda
# Is there any service/api for deriving HD wallet addresses from a master public key?

(Asked by: username_0 on 2015-07-30)

I need this for a tool i'm writing that generates a transaction history report. think: accounting, auditing, etc. The tool does not and should not have access to the private keys.

Ideally, the API would:

1. not require creating a wallet first. I only need it to derive keys.
2. return only addresses that have been used (received funds), up to the gap defined in bip44.

Alternatively, are there any command-line tools that can do this?

**Tags:** bip32-hd-wallets, bip44

> **Comments:**
> **username_1**: I have created a 2of3 wallet on Coinbase. I have 3 different xpub. I tried all 3 xpub on goochain.net but in all appear 0 balance. But I have 2 btc. How to monitor the 2of3 of coinbase using xpub?  
> **username_2**: @username_1, that sounds like the beginnings of a good question, perhaps you should ask a separate question! The field you entered in before is for answers, not questions. Does coinbase show you an address that starts with a '3' somewhere? That's where the 2-of-3 coins should be held.  

---

## 6 answers

### Answer by username_0 on 2016-01-01. Score: 4

I ended up writing my own command-line tool to perform wallet discovery and print out a report.

It supports single xpub derivation as well as multisig m-of-n wallets, specifically CoPay wallets.

It determines if each address has been used or not by querying blockchain.info or also toshi or insight servers (the latter two can be run locally.)

Anyone interested can check it out at:
<https://github.com/dan-da/hd-wallet-addrs>

I plan to add a web frontend soon. Update: Web frontend is [here](https://mybitprices.info/hd-wallet-addrs.html).

Also, blockonomics is pretty good and very fast. They don't seem to support CoPay/multisig yet though.


---

### Answer by username_3 on 2015-07-31. Score: 1

I have 3 ways I go about this:

1. [BX tool](https://github.com/libbitcoin/libbitcoin-explorer) by libbitcoin
2. Python libraries, namely *[pybitcointools](https://github.com/vbuterin/pybitcointools)* ...
3. and *[PyCoin](https://github.com/richardrkiss/pycoin)*

Both have a CLI interface, though *PyCoin* is more comprehensive. The address scanning is something that can be achieved with [this pybitcointools fork](https://github.com/simcity4242/pybitcointools).

You'll need to clarify your preferences in terms of shell/OS/programming language for me to detail this specifically. If you're comfortable with pybitcointools I can detail that.

> **Comments:**
> **username_3**: @username_0 I will detail the method which best suits your situation, so take a look at these options and chime in on your preference. I can detail them all, if needs be.  
> **username_0**: linux / php CLI.    After more investigation it looks like https://github.com/Bit-Wasp/bitcoin-lib-php is probably my best bet, and also doing it locally  keeps the xpub private vs calling an online service.  

---

### Answer by username_4 on 2015-11-03. Score: 0

You can search xpubs using [blockonomics api](https://www.blockonomics.co/views/api.html) .Would return both main chain and change addreses along with their balance

> **Comments:**
> **username_5**: They must have removed that option because their docs say nothing about xpubs  
> **username_4**: its does actually https://www.blockonomics.co/views/faqs.html (How to search HD wallet)  

---

### Answer by username_6 on 2015-07-31. Score: 0

Goochain web service does exactly what you request:
It provides addresses used listing of the wallet. It doesn't have access to the private keys.
Just input xpub... in search field, and it would display all transaction on any BIP32 and BIP44 derived addresses.

goochain.net

This is not API but a web service.

> **Comments:**
> **username_0**: hmm, goochain looks like they have the functionality but I see no way to programmatically call their service, so it doesn't solve my problem.  Also it is not clear to me if they find change addresses, which I need.  
> **username_6**: This is only a web service that provides basic accounting and transaction history. Goochain displays all used addresses from a xpub. It displays change and payment addresses (/0 and /1), additionally it searches on the direct chain (so you can provide xpub for any branch)  

---

### Answer by username_7 on 2016-11-09. Score: 0

Try [Goochain's Watch-Only Wallet Services](https://goochain.net/wallet/) for BIP32 addresses created via Ledger, Trezor, or Mycelium. Based on the xpub, their tool only returns addresses that have been used on-chain previously.


---

### Answer by username_8 on 2018-03-08. Score: 0

<https://samouraiwallet.com/sentinel.html>

Samourai wallet has another app called Sentinel which is a watch-only bitcoin wallet. The app does not handle private keys for spending (aside from sweeping). Sentinel provides transaction, balance, and receive addresses for each public key provided.


---

