Post
Topic
Board Development & Technical Discussion
Merits 3 from 2 users
Re: Quick balance check
by
ETFbitcoin
on 15/10/2022, 11:38:06 UTC
⭐ Merited by NeuroticFish (2) ,bitmover (1)
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.