Search code examples
bitcoinblockchainblockchain.info-api

How to check a Bitcoin wallet balance from first generated address (m/44'/0'/0'/0/0)


Is there a way to check a wallet balance from the 1st generated address (parent address) not knowing the child addresses? Need to do it automatically from Linux (API-style) not copy-paste in browser.

Parent address: 1H7wwfstu4e8yianuPtk9CSxUonq4pzLju 0 BTC

Child address: 14ZcreY3y3XxcsRCzfvzz6fWZfBTp6a2ZX 0.00336455 BTC

$ curl -s 'https://blockchain.info/q/addressbalance/1H7wwfstu4e8yianuPtk9CSxUonq4pzLju'
0

$ curl -s 'https://blockchain.info/q/addressbalance/14ZcreY3y3XxcsRCzfvzz6fWZfBTp6a2ZX'
336455

EDIT:

I know the "BIP32 Root Key" and the "BIP32 Extended Public Key", can I do it using any of those?

NEW EDIT:

Thought about using Extended Public Key, can someone confirm if I'm right?

https://blockchain.info/xpub/xpub6Exa9kqjZDFBtx2qftFG3nhqiZ7wZsde2PtygviSLrSunmJeaugdFY67Cv9JSMocDojpvMEykWjzcJFzH8bQtfJdogNSpz5Dy4E6L6yUECV

Solution

  • This can be done using Extended Public Key:

    https://blockchain.info/xpub/xpub6Exa9kqjZDFBtx2qftFG3nhqiZ7wZsde2PtygviSLrSunmJeaugdFY67Cv9JSMocDojpvMEykWjzcJFzH8bQtfJdogNSpz5Dy4E6L6yUECV