How to Check Balances for Multiple Bitcoin Addresses

20 replies 492 views
Posts: 20 · Reputation: 30
#1Jul 1, 2022, 12:51 AM
I've seen a lot of people asking how to check balances for tons of bitcoin addresses. Like, if you've got a list of thousands, what's the trick?
3 Reply Quote Share
0xBlockMember
Posts: 34 · Reputation: 139
#2Jul 1, 2022, 02:04 AM
Most likely, they wanna check a bunch of empty addresses. If you have a list in a.csv file, filtering through 10,000 addresses isn’t too bad. But imagine millions. Your computer might choke on that.
3 Reply Quote Share
mr_apeNewbie
Posts: 401 · Reputation: 35
#3Jul 1, 2022, 01:26 PM
Businesses flip this around. They watch their mempool for new transactions and check against a small list of outputs they care about. They don't get swamped, so it's way easier for them.
6 Reply Quote Share
0xBlockMember
Posts: 34 · Reputation: 139
#4Jul 2, 2022, 03:24 PM
But what if their system goes down? And what about those edge cases? The script OP is sharing could actually help businesses confirm their coin holdings too, you know.
5 Reply Quote Share
the_altNewbie
Posts: 1 · Reputation: 6
#5Jul 3, 2022, 10:38 AM
Why not just wait and grab the whole file from Blockchair? No need to spam servers with requests. Seems like a better approach.
3 Reply Quote Share
Posts: 20 · Reputation: 30
#6Jul 3, 2022, 03:56 PM
Didn’t know that file had a download limit. Thanks for the heads up!
3 Reply Quote Share
0xBlockMember
Posts: 34 · Reputation: 139
#7Jul 4, 2022, 06:18 AM
I think that’s what OP was getting at. If you're checking millions of addresses, public explorers will slap you with rate limits.
0 Reply Quote Share
0xBlockMember
Posts: 34 · Reputation: 139
#8Jul 4, 2022, 06:57 AM
True, but there’s still the ethical side of using someone else's explorer without permission. It’s a sketchy area.
0 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#9Jul 4, 2022, 08:22 AM
Last comment from me on that, before it goes off the rails.
0 Reply Quote Share
5tack5atsSenior Member
Posts: 1 · Reputation: 1040
#10Jul 4, 2022, 12:36 PM
Why not just get an API key from blockchain.com? I got one, and it gives balances with transaction counts.
3 Reply Quote Share
Posts: 20 · Reputation: 30
#11Jul 6, 2022, 01:09 AM
If anyone wants a copy without limits, I've linked the latest version here.
4 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#12Jul 6, 2022, 01:32 AM
Can someone tweak the code to get public addresses too?
0 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#13Jul 6, 2022, 04:23 AM
I meant public keys, can you modify your code?
4 Reply Quote Share
0xBridgeMember
Posts: 17 · Reputation: 247
#14Jul 7, 2022, 04:53 PM
I've tried a super quick method before: get funded addresses, make a list of the ones you want, merge, sort, and check for duplicates. Easy on Linux with just a few commands!
1 Reply Quote Share
Posts: 20 · Reputation: 30
#15Jul 8, 2022, 02:39 AM
Yeah, that’s cool if you’re just after current balances. I’m more interested in history like, has this address even showed up before?
4 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#16Jul 8, 2022, 07:47 AM
I ran a test on my old laptop: checking 300k addresses against 30 million took just 6 seconds. Blockchair's slow though, and Bitcoin Core could be a better bet.
0 Reply Quote Share
Posts: 20 · Reputation: 30
#17Jul 8, 2022, 09:10 AM
Yup, syncing Bitcoin Core and parsing blocks is a mission. Not easy at all. Which parser are you using now? I updated my address list a while back, but it was a slog.
3 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#18Jul 10, 2022, 11:00 AM
I started with a different approach, but splitting tasks helps manage CPU load. I can set up a mirror for those files with better speeds if anyone wants.
4 Reply Quote Share
Posts: 15 · Reputation: 29
#19Jul 10, 2022, 04:12 PM
I’d like to know your method too, but the SHODAN part sounds tricky.
2 Reply Quote Share
Posts: 3523 · Reputation: 35
#20Jul 12, 2022, 10:56 PM
First step is finding exposed Insight servers online. Search Shodan for "port:3001 insight bitcoin". I registered but can’t seem to figure out the right command.
4 Reply Quote Share

Related topics

How to Check Balances for Multiple Bitcoin Addresses | Cryptotalks