3

For my project I need to check the balance of a public address using bitcoind. Can I do that without importing the private key, only by public address?

Need solution no dependence, because I tried with blockchain.info API and after x requests, they blocked me. I need to check a lot addresses every 30 minutes.

Jannes
  • 6,344
  • 1
  • 25
  • 28
AutoSoft
  • 31
  • 1

1 Answers1

1

Instead of polling many addresses every 30 minutes, you probably want to import your addresses into bitcoind, using bitcoin-cli importaddress and then have bitcoind notify you automatically when a new transaction comes in, using the walletnotify option.

See for example: How do I use walletnotify?

There are a lot of details to get right: transactions might never confirm, the transaction ID might change. When bitcoind loses connection to the network, you want your script to be able to handle that. etc.

Jannes
  • 6,344
  • 1
  • 25
  • 28
  • for import address bitcoind ask private key, I'm need solution only whit public key. – AutoSoft Oct 27 '15 at 13:12
  • 1
    Bitcoind supports watch-only addresses with only the address. See here for more details: https://bitcoin.stackexchange.com/questions/22152/add-a-watch-only-wallet-in-bitcoind – JohnDvorak Oct 27 '15 at 14:37