I am setting up my site on a hosting (not a server, just a hosting) where i will accept payments of bitcoins and maybe other cryptos later, after a week or so, i want to "sweep" my wallets.

In short:

I have a list with privatekeys and minikeys. That's all. I want to know if possibly, without quering API (html dom of blockchain.info/q/ would be better) which wallet has balance >0 and saves that key into another file.

So is there any way to check balances without importing? I mean, converting private keys to wallet adress?

Or maybe there is any way to create a wallet with PHP where i can create a wallet, get it's wallet adress and private key.

I don't want to use API, since some apis has limited querries per hour, and if i want to check them all hourly / daily it may hit the limit.

Thanks for help!

1 Answer 1


You should not store your private keys on a webserver, unless you actually need to spend the bitcoins from that very same server.

Remember, to receive money on an address, check its balance, etc, you only need the address. This is much safer because that way nobody could steal your money, even if they get full access to your server.

One way to do it is to import all private keys in a new, separate wallet (default Bitcoin Core install would do), password-protect the wallet with a long, random, gibberish password and then discard the password (of course make sure you also still have the private keys in the original wallet). This essentially creates a "read only" wallet, which would be safe to put on your webserver, and allows for all functionality on your addresses, except spending the money.

To actually spend the money, you use the original wallet that doesn't need to be on your webserver.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.