<p>That's exactly what the <a href="https://play.google.com/store/apps/details?id=com.samourai.sentinel" rel="nofollow noreferrer">Sentinel</a> app does: imports a read-only XPUB key in order to passively watch the balance of an offline wallet, be it paper wallet, trezor or ledger.</p>

<p>For use with Ledger Nano S use the following steps:</p>

<ol>
<li>From the <em>chrome app</em>: Click <strong>My Account</strong>.</li>
<li>Click <strong>Account Settings</strong> in the top right corner.</li>
<li>Click <strong>Export</strong> next to <strong>Extended public key</strong>.</li>
<li>In the <em>Sentinel</em> app tap the <kbd>+</kbd> button and select

<ul>
<li>Bitcoin Wallet (BIP44) — if you set up your ledger as legacy.</li>
<li>Segwit Bitcoin Wallet (BIP49) — if you set up your ledger as segwit.</li>
</ul></li>
</ol>

<p>Sentinel can also be used to receive funds to your ledger in the sense that it can derive the next public address from the XPUB and display its QR-code.</p>

<p>If you feel paranoid you can also build the app from source:  <a href="https://github.com/Samourai-Wallet/sentinel-android" rel="nofollow noreferrer">https://github.com/Samourai-Wallet/sentinel-android</a>. Maybe it's worth mentioning that while the client code is open-source the server-side code is not, so we don't really know what is going on in the backend.</p>

<h3>Direct query via address or xpub</h3>

<p>Another (tedious) alternative would be to collect all the public non-empty addresses in the wallet and get their cumulative balance e.g. via <a href="https://blockchain.info/q/addressbalance/myadress1|myaddres2|myaddress3" rel="nofollow noreferrer">https://blockchain.info/q/addressbalance/myadress1|myaddres2|myaddress3</a>... — the result is a plain text number in satoshis; divide by <code>100000000</code> (i.e. <code>1e8</code>) to get BTC.</p>

<p>Or, if you are comfortable sending your xpub over the internet, then you can query blockchain.info with your xpub, e.g.:</p>

<ul>
<li><p><strong>Current balance in HTML</strong>
<a href="https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz" rel="nofollow noreferrer">https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz</a></p></li>
<li><p><strong>Current balance as JSON</strong>
<a href="https://blockchain.info/multiaddr?active=xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz" rel="nofollow noreferrer">https://blockchain.info/multiaddr?active=xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz</a> <em>(if it shows a zero balance for a non-empty wallet then it means blockchain.info guys have not yet updated this api end-point to work with segwit)</em>.</p></li>
</ul>

CC BY-SA 3.0
2017-12-31T18:16:06.687Z
Just to expand on the "comfortable sending your xpub over the internet" part: an xpub key combined with a child private key can enough to reveal parent private keys, so while xpub keys are technically public, you want to be more cautious with the data than you might in other cases.
copumpkin
CC BY-SA 4.0
2019-03-30T21:18:45.830Z
Wrote some script to turn TX into a CSV https://github.com/digitaldonkey/TransactionsExport
digitaldonkey
CC BY-SA 4.0
2022-11-19T22:07:53.243Z
Thanks for your answer! But what if blockchain.com shows zero? Here is my question: https://bitcoin.stackexchange.com/questions/116038/how-to-retrieve-total-btc-held-in-ledger-wallet?noredirect=1&lq=1
Ryan
CC BY-SA 4.0
2017-12-09T10:27:08.893Z
2018-08-28T21:24:00.117Z
2018-08-28T21:24:00.117Z
ccpizza
<p>You can use a watch only wallet service like <a href="https://www.blockonomics.co/blockonomics" rel="nofollow noreferrer">Blockonnomics</a> to see addresses/balance in your xpub. In fact it also allows you to generate new receiving addresses.</p>

CC BY-SA 3.0
2018-01-03T09:47:25.987Z
2018-01-03T09:47:25.987Z
dark knight
<p>the easiest way is to create a view only wallet with electrum, enter your master public key, done.</p>
<p>(&amp; you may then create receiving addresses and transaction file that you can sign offline &amp; then broadcast from that view only wallet).</p>

CC BY-SA 4.0
2022-09-21T07:09:35.340Z
2022-09-21T07:09:35.340Z
mikakun
<p>Certainly. If you use the master public key (the <code>xpub</code> that you have), you can enter it into a site like blockchain.info to get the balances of many of the addresses derived from that key. Generally software that do this sort of monitoring (including your wallet software), only search a few addresses (all of the ones that have been used in a transaction and then some number ahead of those) so it may miss some of your transactions.</p>

<p>You can also setup a desktop wallet software like Electrum to work with your Ledger Nano S. This allows you to get new addresses and monitor your balance without having the device connected and still be able to connect your Ledger to spend from it when you want to.</p>

CC BY-SA 4.0
2022-11-19T22:08:29.267Z
Thanks for your answer! Is there a way to do it without desktop software? Here is my question: https://bitcoin.stackexchange.com/questions/116038/how-to-retrieve-total-btc-held-in-ledger-wallet?noredirect=1&lq=1
Ryan
CC BY-SA 3.0
2017-10-11T19:41:57.207Z
2017-10-11T19:41:57.207Z
Ava Chow
<p>I'm trying to find a way where I can view balance of my ledger nano s wallet without always attaching it to computer all the time.</p>

<p>I found something called <code>xpub</code> address which allows me to generate public addresses without my hardware wallet, I am now trying to figure out if there is a way (api ideally) to use this xpub address to view balance from my previously generated addresses.</p>

<wallet><address><public-key><balance>
Is it possible to use xpub address to monitor balance from previously generated addresses?
Ilja
# Is it possible to use xpub address to monitor balance from previously generated addresses?

(Asked by: username_0 on 2017-10-11)

I'm trying to find a way where I can view balance of my ledger nano s wallet without always attaching it to computer all the time.

I found something called `xpub` address which allows me to generate public addresses without my hardware wallet, I am now trying to figure out if there is a way (api ideally) to use this xpub address to view balance from my previously generated addresses.

**Tags:** wallet, address, public-key, balance


---

## 4 answers

### Answer by username_7 on 2017-10-11. Score: 5 | Accepted answer

Certainly. If you use the master public key (the `xpub` that you have), you can enter it into a site like blockchain.info to get the balances of many of the addresses derived from that key. Generally software that do this sort of monitoring (including your wallet software), only search a few addresses (all of the ones that have been used in a transaction and then some number ahead of those) so it may miss some of your transactions.

You can also setup a desktop wallet software like Electrum to work with your Ledger Nano S. This allows you to get new addresses and monitor your balance without having the device connected and still be able to connect your Ledger to spend from it when you want to.

> **Comments:**
> **username_4**: Thanks for your answer! Is there a way to do it without desktop software? Here is my question: https://bitcoin.stackexchange.com/questions/116038/how-to-retrieve-total-btc-held-in-ledger-wallet?noredirect=1&lq=1  

---

### Answer by username_1 on 2017-12-09. Score: 5

That's exactly what the [Sentinel](https://play.google.com/store/apps/details?id=com.samourai.sentinel) app does: imports a read-only XPUB key in order to passively watch the balance of an offline wallet, be it paper wallet, trezor or ledger.

For use with Ledger Nano S use the following steps:

1. From the *chrome app*: Click **My Account**.
2. Click **Account Settings** in the top right corner.
3. Click **Export** next to **Extended public key**.
4. In the *Sentinel* app tap the `+` button and select
   * Bitcoin Wallet (BIP44) — if you set up your ledger as legacy.
   * Segwit Bitcoin Wallet (BIP49) — if you set up your ledger as segwit.

Sentinel can also be used to receive funds to your ledger in the sense that it can derive the next public address from the XPUB and display its QR-code.

If you feel paranoid you can also build the app from source: <https://github.com/Samourai-Wallet/sentinel-android>. Maybe it's worth mentioning that while the client code is open-source the server-side code is not, so we don't really know what is going on in the backend.

### Direct query via address or xpub

Another (tedious) alternative would be to collect all the public non-empty addresses in the wallet and get their cumulative balance e.g. via <https://blockchain.info/q/addressbalance/myadress1|myaddres2|myaddress3>... — the result is a plain text number in satoshis; divide by `100000000` (i.e. `1e8`) to get BTC.

Or, if you are comfortable sending your xpub over the internet, then you can query blockchain.info with your xpub, e.g.:

* **Current balance in HTML**
  <https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz>
* **Current balance as JSON**
  <https://blockchain.info/multiaddr?active=xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz> *(if it shows a zero balance for a non-empty wallet then it means blockchain.info guys have not yet updated this api end-point to work with segwit)*.

> **Comments:**
> **username_2**: Just to expand on the "comfortable sending your xpub over the internet" part: an xpub key combined with a child private key can enough to reveal parent private keys, so while xpub keys are technically public, you want to be more cautious with the data than you might in other cases.  
> **username_3**: Wrote some script to turn TX into a CSV https://github.com/username_3/TransactionsExport  
> **username_4**: Thanks for your answer! But what if blockchain.com shows zero? Here is my question: https://bitcoin.stackexchange.com/questions/116038/how-to-retrieve-total-btc-held-in-ledger-wallet?noredirect=1&lq=1  

---

### Answer by username_5 on 2018-01-03. Score: 1

You can use a watch only wallet service like [Blockonnomics](https://www.blockonomics.co/blockonomics) to see addresses/balance in your xpub. In fact it also allows you to generate new receiving addresses.


---

### Answer by username_6 on 2022-09-21. Score: 0

the easiest way is to create a view only wallet with electrum, enter your master public key, done.

(& you may then create receiving addresses and transaction file that you can sign offline & then broadcast from that view only wallet).


---

