Bitcoin Forum
October 14, 2024, 05:34:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Quick balance check  (Read 495 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 291
Merit: 133



View Profile
October 12, 2022, 11:03:33 PM
Merited by LoyceV (1)
 #1

Is there a way (API?) to quickly check balance for thousands of public addresses?
Locally (Bitcoin Core) or via any market API?

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
BitMaxz
Legendary
*
Offline Offline

Activity: 3402
Merit: 3146


Is the $100k BTC possible?


View Profile WWW
October 12, 2022, 11:20:53 PM
Merited by n0nce (1)
 #2

There are some sites where you can check the balance of multiple addresses how about this one below
- https://awebanalysis.com/en/bitcoin-multiple-address-check-balance/

Or if you preferred API calls then blochchain.info still has some API calls that you can use for checking multiple addresses.

Read the answer from this post below
- https://bitcoin.stackexchange.com/questions/62018/blockchain-info-multi-address-lookup

It's old but still works.

BTC Road to $80k...
Sarah Azhari
Hero Member
*****
Offline Offline

Activity: 1008
Merit: 747


Vave.com - Crypto Casino


View Profile
October 13, 2022, 02:33:09 AM
 #3

There are some sites where you can check the balance of multiple addresses how about this one below
- https://awebanalysis.com/en/bitcoin-multiple-address-check-balance/
That site uses a captcha, look hard when opening using TOR.
I found another one that doesn't use it, besides that not only bitcoin, we can check also the balance ETH, BCH dan BTG and set a delay if check a large number of addresses
www.homebitcoin.com

PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1385


View Profile
October 13, 2022, 07:18:28 AM
Merited by LoyceV (4)
 #4

Is there a way (API?) to quickly check balance for thousands of public addresses?
Locally (Bitcoin Core) or via any market API?

The fastest solution would be to download daily dump of founded addresses (from blockchair or http://addresses.loyce.club/ ), load into local database (for example postgresql) and then have have a program which launches queries to your database. That way you are independent of network connection, API limitations etc. In long term perspective, this is the best solution (of course you need to update your database from time to time).

Another solution would be to host everything locally - full node, spv server like electrs and then rpc explorer.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3822
Merit: 6553


Looking for campaign manager? Contact icopress!


View Profile
October 13, 2022, 07:29:36 AM
 #5

The fastest solution would be to download daily dump of founded addresses (from blockchair or http://addresses.loyce.club/ ), load into local database (for example postgresql) and then have have a program which launches queries to your database. That way you are independent of network connection, API limitations etc. In long term perspective, this is the best solution (of course you need to update your database from time to time).

Another solution would be to host everything locally - full node, spv server like electrs and then rpc explorer.

This is what I'd suggest: a local block explorer that provides the API OP needs.
The dumps from loyce.club are big (over 1GB zipped for the addresses with funds) and I find downloading them on a daily basis counterproductive.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1750
Merit: 7322


In memory of o_e_l_e_o


View Profile WWW
October 13, 2022, 07:32:05 AM
Merited by NeuroticFish (1)
 #6

The fastest solution would be to download daily dump of founded addresses (from blockchair or http://addresses.loyce.club/ ), load into local database (for example postgresql) and then have have a program which launches queries to your database. That way you are independent of network connection, API limitations etc. In long term perspective, this is the best solution (of course you need to update your database from time to time).

Another solution would be to host everything locally - full node, spv server like electrs and then rpc explorer.

This is what I'd suggest: a local block explorer that provides the API OP needs.
The dumps from loyce.club are big (over 1GB zipped) and I find downloading them on a daily basis counterproductive.

Why not just a database, if you're going to be dumping data and blocks onto the hard disk? But not SQLite or some other db-as-file.

At least you will be able to make comprehensive SQL queries, make graphs (using something like PowerBI) and scale to many computers if you run out of disk space.

ABCbits
Legendary
*
Offline Offline

Activity: 3024
Merit: 7939


Crypto Swap Exchange


View Profile
October 13, 2022, 11:46:56 AM
Merited by citb0in (1)
 #7

Is there a way (API?) to quickly check balance for thousands of public addresses?
Locally (Bitcoin Core) or via any market API?

FYI, Bitcoin Core isn't suitable for your needs. It lacks address index, so you'll need to use scantxoutset or import the address on wallet then rescan whole blockchain which take some time. Many block explorer offer API, but i doubt the free option is generous enough to let you get details of thousand address within short time.

There are some sites where you can check the balance of multiple addresses how about this one below
- https://awebanalysis.com/en/bitcoin-multiple-address-check-balance/
That site uses a captcha, look hard when opening using TOR.

I tried opening that website on Tor Browser and didn't face any captcha or security check

Another solution would be to host everything locally - full node, spv server like electrs and then rpc explorer.

Take note depending on which software you use, you only don't to run all 3. For example, Bcoin (full node with address index) or Bitcoin Core and Mempool.space.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
joniboini
Legendary
*
Offline Offline

Activity: 2338
Merit: 1805



View Profile WWW
October 13, 2022, 01:40:01 PM
 #8

This website looks old and according to it, the last update was back in 2020. I'd not use it if there is a better alternative out there.

That site uses a captcha, look hard when opening using TOR.
I tried opening that website on Tor Browser and didn't face any captcha or security check
I think he is referring to the captcha check before you can proceed with the balance checking, not the web security check itself.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
pbies (OP)
Full Member
***
Offline Offline

Activity: 291
Merit: 133



View Profile
October 13, 2022, 08:53:17 PM
 #9

I've chosen addresses and balances from:

http://addresses.loyce.club/

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
Sarah Azhari
Hero Member
*****
Offline Offline

Activity: 1008
Merit: 747


Vave.com - Crypto Casino


View Profile
October 14, 2022, 03:15:58 AM
 #10

There are some sites where you can check the balance of multiple addresses how about this one below
- https://awebanalysis.com/en/bitcoin-multiple-address-check-balance/
That site uses a captcha, look hard when opening using TOR.
I tried opening that website on Tor Browser and didn't face any captcha or security check
I mean captcha like this,


This website looks old and according to it, the last update was back in 2020. I'd not use it if there is a better alternative out there.
oh, I don't know that, I just found that link on bitmover post.

I've chosen addresses and balances from:

http://addresses.loyce.club/
I don't know exactly what you want, you ask question: how to check the balance for thousands of public addresses.
the loyce link only has data address which you can't check the address that you want.

LoyceV
Legendary
*
Offline Offline

Activity: 3458
Merit: 17513


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 14, 2022, 09:42:07 AM
Last edit: October 14, 2022, 10:00:33 AM by LoyceV
 #11

The fastest solution would be to download daily dump of founded addresses (from blockchair or http://addresses.loyce.club/ ), load into local database (for example postgresql) and then have have a program which launches queries to your database.
The fastest solution is this:
How to use
The most likely use is to check a long list of Bitcoin addresses for a remaining balance.
On Linux, use this to find matching addresses (after extrating the compressed .gz file of course):
Code:
comm -12 Bitcoin_addresses_LATEST.txt <(cat mylist.txt | sort | uniq)
  • Bitcoin_addresses_LATEST.txt: the extracted latest version downloaded from addresses.loyce.club.
  • mylist.txt: your own list of addresses, one address per line.
This takes only seconds to check millions of addresses. If your text file has Microsoft formatting, you may need to use this instead:
Code:
comm -12 Bitcoin_addresses_LATEST.txt <(cat mylist.txt | fromdos | sort | uniq)
But, that only gets you a list of funded addresses, not their balances. I'll cook something up:
Code:
grep -f mylist.txt blockchair_bitcoin_addresses_and_balance_LATEST.tsv
This is a bit slower and eats RAM: 500,000 input addresses uses 1.5 GB and took 50 seconds. You could mix it with the earlier command to only search the balance for addresses that aren't empty.

I don't know exactly what you want, you ask question: how to check the balance for thousands of public addresses.
the loyce link only has data address which you can't check the address that you want.
See the explanations on List of all Bitcoin addresses with a balance.

bitmover
Legendary
*
Offline Offline

Activity: 2450
Merit: 6244

bitcoindata.science


View Profile WWW
October 14, 2022, 10:35:27 AM
Merited by NeuroticFish (2)
 #12

I was created this solution here:

https://www.bitcoindata.science/bitcoin-balance-check.html

You can check the balance of many addresses at once, but you can't add an xpub.

I can add this feature in a few weeks
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1385


View Profile
October 14, 2022, 05:50:28 PM
 #13

The fastest solution would be to download daily dump of founded addresses (from blockchair or http://addresses.loyce.club/ ), load into local database (for example postgresql) and then have have a program which launches queries to your database.
The fastest solution is this:
How to use
The most likely use is to check a long list of Bitcoin addresses for a remaining balance.
On Linux, use this to find matching addresses (after extrating the compressed .gz file of course):
Code:
comm -12 Bitcoin_addresses_LATEST.txt <(cat mylist.txt | sort | uniq)

All depends on how it is going to be used. If you want to test a bulk of addresses from time to time - then yes, maybe.
If you want to test 1 address every few (mili)seconds, it will be too slow, dedicated (and properly indexed) database will be better.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3822
Merit: 6553


Looking for campaign manager? Contact icopress!


View Profile
October 14, 2022, 06:23:25 PM
 #14

All depends on how it is going to be used. If you want to test a bulk of addresses from time to time - then yes, maybe.
If you want to test 1 address every few (mili)seconds, it will be too slow, dedicated (and properly indexed) database will be better.

If OP goes on this route, he could load up the file into an optimized structure in memory (maybe b-tree?) at the start of the day and then just query his own structure every time. This should be quicker than using an actual database.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 3024
Merit: 7939


Crypto Swap Exchange


View Profile
October 15, 2022, 11:38:06 AM
Merited by NeuroticFish (2), bitmover (1)
 #15

I was created this solution here:

https://www.bitcoindata.science/bitcoin-balance-check.html

You can check the balance of many addresses at once, but you can't add an xpub.

I can add this feature in a few weeks

I noticed sentence "Powered by mempool.space and Coindesk." on your website. Have you checked whether those free API actually let user check thousand address within short time?

All depends on how it is going to be used. If you want to test a bulk of addresses from time to time - then yes, maybe.
If you want to test 1 address every few (mili)seconds, it will be too slow, dedicated (and properly indexed) database will be better.

If OP goes on this route, he could load up the file into an optimized structure in memory (maybe b-tree?) at the start of the day and then just query his own structure every time. This should be quicker than using an actual database.

Actual database also use optimized data structure (such as btree or trie), although it comes down to whether you can utilize it properly or not.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
LoyceV
Legendary
*
Offline Offline

Activity: 3458
Merit: 17513


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 15, 2022, 12:21:44 PM
Merited by bitmover (1)
 #16

I tried 400 addresses, but it never loaded the results.

"Powered by mempool.space and Coindesk."
Would it work to replace those by your own utxo dump from Bitcoin Core? It takes more resources than using an API, but won't have any limitations on how many addresses you can check.

bitmover
Legendary
*
Offline Offline

Activity: 2450
Merit: 6244

bitcoindata.science


View Profile WWW
October 15, 2022, 12:32:03 PM
 #17


I noticed sentence "Powered by mempool.space and Coindesk." on your website. Have you checked whether those free API actually let user check thousand address within short time?

No, you can't use thousands at once. It won't load. You need to make a few each time.

Would it work to replace those by your own utxo dump from Bitcoin Core? It takes more resources than using an API, but won't have any limitations on how many addresses you can check.

Certainly this would be the best solution.
I believe my next project will to run my own node in an online server. I don't have it now. I will take a look on the costs and what else could I do with it.
LoyceV
Legendary
*
Offline Offline

Activity: 3458
Merit: 17513


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 15, 2022, 12:33:31 PM
Merited by bitmover (2)
 #18

I believe my next project will to run my own node in an online server. I don't have it now. I will take a look on the costs and what else could I do with it.
I happen to have one running, it's a donated Xeon that's meant for cool projects like this. I don't mind feeding you data dumps in some format.

AnotherAlt
Sr. Member
****
Offline Offline

Activity: 280
Merit: 259


https://bitcoincleanup.com #EndTheFUD


View Profile
October 15, 2022, 12:52:24 PM
 #19

I would say bitmover's project is cool. OP can check if this meets your needs. Running a server for such a thing doesn't worth it unless you use it daily or for your work. You can also check the BitAC Android app. It's an open-source android app, and the codes can be found on Github. I haven't tried the app yet since I never had to check multiple address balances at once. You may want to try it and let us know if it works  Wink

██████████ BitcoinCleanUp.comDebunking Bitcoin's Energy Use ██████████
██████████                Twitter#EndTheFUD                 ██████████
NeuroticFish
Legendary
*
Offline Offline

Activity: 3822
Merit: 6553


Looking for campaign manager? Contact icopress!


View Profile
October 15, 2022, 01:50:17 PM
 #20

Actual database also use optimized data structure (such as btree or trie), although it comes down to whether you can utilize it properly or not.

That's correct. The indexes at least are optimized. But the access to the database itself also comes with a cost.
I agree, it's after all up to dev skills and preferences.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1] 2 »  All
  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!