Bitcoin Forum
May 27, 2024, 07:33:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to get balance bch from xpub (blockchain.info)  (Read 195 times)
locker007 (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
January 07, 2018, 02:25:29 PM
 #1

how to get bch balance from xpub key like: https://blockchain.info/address/xpub6Bn..... ? All xpub from blockchain.info
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
January 07, 2018, 05:19:23 PM
 #2

Blockchain.info Is a BITCOIN block explorer.
It won't work for an altcoin like BCash.

This is a BCash block explorer: https://blockdozer.com/insight/

Unfortunately, no BCash block explorer can search for xpub.

If you want to, you can do it manually by deriving the addresses from the xpub and checking them on a block explorer.
locker007 (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
January 07, 2018, 06:19:30 PM
 #3

ah, okey, how i can get all bitcoin addresses from xpub?
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
January 07, 2018, 08:05:08 PM
 #4

ah, okey, how i can get all bitcoin addresses from xpub?
I can think of a few ways...
You can use Ian Coleman's BIP39 tool(remember to download the Website and access it from an airgapped  PC) if you have the seed phrase (BTC and BCash have the same address derivation scheme)
It will create the list of bitcoin addresses from the seed (same thing the xpub does)

If you don't have the seed then
You can use something like this: https://github.com/dan-da/hd-wallet-addrs
But edit it to query BCash block explorer APIs instead of bitcoin's so you can get the balance of the addresses.

There might be easier ways but I'm sleepy and can't think of anything better now
locker007 (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
January 07, 2018, 09:07:19 PM
 #5

 so, i can make this automaticaly? maybe php script or python?
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
January 07, 2018, 09:14:59 PM
 #6

 so, i can make this automaticaly? maybe php script or python?
This is a script that does it for bitcoin. https://github.com/dan-da/hd-wallet-addrs
BCash is similar to bitcoin so you just have to change the API to query BCash block explorers instead
locker007 (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
January 07, 2018, 09:21:35 PM
 #7

oooohhhh!! thx maaan!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!