<p>It's not possible access funds in SegWit addresses (actually UTXOs) as if they were in legacy addresses. A SegWit address and a legacy address with the same public key map to different addresses, hence they don't share the same funds.</p>

CC BY-SA 4.0
2018-06-26T15:37:59.377Z
2018-06-26T15:37:59.377Z
MCCCS
<ul>
<li>You can use an explorer like <a href="https://www.blockonomics.co" rel="nofollow noreferrer">blockonomics</a> that supports <a href="https://blog.blockonomics.co/a-segwit-blockexplorer-47cd516dd8c5" rel="nofollow noreferrer">segwit xpubs</a> and also has an API</li>
<li>If you want to use blockchain.info only, you need to derive the segwit addresses from the ypub and then lookup these addresses to get the balance. Here is <a href="https://gist.github.com/matthewdowney/998e6cfc750d286b3e2cca1aac7ca0ed" rel="nofollow noreferrer">a script</a>. Converting ypub to xpub won't work because bc.info will still generate legacy P2PKH addresses from xpub, whereas it should generating segwit in P2SH addresses.</li>
</ul>

CC BY-SA 4.0
2019-11-13T09:31:09.010Z
2019-11-13T09:31:09.010Z
dark knight
<p>I'm trying to convert a Segwit YPUB address I got from a Ledger Wallet to a Legacy XPUB address in order to query the transactions from the wallet. I've yet to find a reliable API that supports YPUB and I'm using Blockchain.info to fetch the information for Bitcoin.</p>

<p>While I've tried multiple methods to convert a YPUB to XPUB (getting the same addresses with every method I've found - changing the header with the network specific magic key), I don't see the balance on the resulted XPUB address. It shows 0 balance.</p>

<p>Is it possible that a converted address would display the balance of the original address?</p>

<p>Thanks,
Rares</p>

CC BY-SA 4.0
2018-06-26T15:35:18.253Z
To prevent confusion, in this question YPUB stands for [BIP 49 Derivation scheme for P2WPKH-nested-in-P2SH based accounts](https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki)
MCCCS
<address><segregated-witness><xpub>
Converted Segwit address (YPUB) to Legacy (XPUB), but balances differ
Rares H.
# Converted Segwit address (YPUB) to Legacy (XPUB), but balances differ

(Asked by: username_0 on 2018-06-26)

I'm trying to convert a Segwit YPUB address I got from a Ledger Wallet to a Legacy XPUB address in order to query the transactions from the wallet. I've yet to find a reliable API that supports YPUB and I'm using Blockchain.info to fetch the information for Bitcoin.

While I've tried multiple methods to convert a YPUB to XPUB (getting the same addresses with every method I've found - changing the header with the network specific magic key), I don't see the balance on the resulted XPUB address. It shows 0 balance.

Is it possible that a converted address would display the balance of the original address?

Thanks,
Rares

**Tags:** address, segregated-witness, xpub

> **Comments:**
> **username_1**: To prevent confusion, in this question YPUB stands for [BIP 49 Derivation scheme for P2WPKH-nested-in-P2SH based accounts](https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki)  

---

## 2 answers

### Answer by username_1 on 2018-06-26. Score: 1 | Accepted answer

It's not possible access funds in SegWit addresses (actually UTXOs) as if they were in legacy addresses. A SegWit address and a legacy address with the same public key map to different addresses, hence they don't share the same funds.


---

### Answer by username_2 on 2019-11-13. Score: 0

* You can use an explorer like [blockonomics](https://www.blockonomics.co) that supports [segwit xpubs](https://blog.blockonomics.co/a-segwit-blockexplorer-47cd516dd8c5) and also has an API
* If you want to use blockchain.info only, you need to derive the segwit addresses from the ypub and then lookup these addresses to get the balance. Here is [a script](https://gist.github.com/matthewdowney/998e6cfc750d286b3e2cca1aac7ca0ed). Converting ypub to xpub won't work because bc.info will still generate legacy P2PKH addresses from xpub, whereas it should generating segwit in P2SH addresses.


---

