I am willing to write Python script to check for some public addresses balances. I understand that I need to access API of known exchanges (Coinbase, Binance). I also know that there will be limit of requests sent in time.

As far as I can see there is possibility to check for wallet balances. But what about checking some public BTC addresses?

3 Answers 3


You can access an API and be limited by their ToS but you don't have to.

All transactions (TX) and BTC addresses (pubKey) are public on the blockchain with the distinction that all TX are recorded, but pubKeys show up only once mentioned in a TX.

Assuming you're talking about bitcoin and not something else you should run bitcoind on your machine and query it locally without limitations.

bitcoin-cli getbalance

  • getbalance is about wallet, not transactions in the blockchain...
    – pbies
    Nov 6, 2022 at 5:02

You can use services like blockchain.com, blockchair.com or tokenview.io to explore crypto addresses. It will show you balance, a list of transactions, date and time and some additional info. As for your script, you can use requests library to send requests to API and receive JSON data or scrape the web-sites directly using requests and beautifulsoup.


Solution script:

#!/usr/bin/env python3

import requests

addr=input('Enter address to check: ')

if addr=='':


if not r.status_code==200:



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.