xPub is an extended public key from which all associated public keys or recipient addresses (but not private keys) can be derived. With an xPub you can read all addresses and therefore all transactions from a wallet, but you cannot make any transactions. So with xPub you don't get access to your coins, but only the possibility to see all transactions of a wallet.
Here you can find instructions how to get the xPub key for the most common wallets.
Hardware Wallets
Ledger Nano
- Launch "Ledger Live"
- Under "Accounts" click on the desired Bitcoin account
- Click on the tool icon in the upper right corner
- Open "Advanced Logs"
- Find and copy the entry that starts with xpub, like xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
- The import from a ledger wallet still needs a small "hack"
Ledger always outputs the prefix "XPUB" for accounts from so-called Segwit addresses (starting with 1) as well as for accounts from Native Segwit addresses (starting with bc1). (=first 4 digits)
Actually Segwit should start with YPUB and Native Segwit with ZPUB.
- If you find 84' in the "freshAddressPath", then change the prefix of the extended public key from the field "xpub" to "zpub" (i.e. the first letter of the key 'x' to 'z').
A separate mask for ledger imports is in the works. This will then perform the above described in the background.
- If you find a 49' in the "freshAddressPath", then change the prefix of the Extended Public Key from the field "xpub" to "ypub" (i.e. the first letter of the key 'x' to 'y')
- The import from a ledger wallet still needs a small "hack"
Trezor (One und Model T)
- Launch the application from your Trezor wallet
- Click on the image of your Trezor device and then on "Show XPUBs"
- Copy out the xPub keys
BitBox
- Start your BitBox Wallet Client
- Click on the corresponding Bitcoin account in the left menu
- Click on the "i" button next to the account name in the right window
- Copy out the xPub key
KeepKey
Unfortunately, KeepKey does not yet offer a way to get the xPub key via the GUI. For the technically savvy users, KeepKey offers the following instructions here.
Online Wallets
Blockchain.com
- Log in to your Blockchain.com account
- Click on "Settings" and then on "Wallets & Addresses"
- Find your wallet in the table on the right and click on "Manage"
- Click on "Options" and then on "Show xPub"
- Copy out the xPub key
- Repeat the steps for each wallet
Software Wallets
Electrum
- Start your Electrum application
- Click on "Wallet" and then on "Master Public Keys"
- Copy out the xPub key
Exodus
You can find the xPub export instructions for Exodus here.