On a tutorial in Youtube it uses pybitcointools. Upon searching it's github repository, I have found that it was not maintained anymore. Are there any alternative to this library which can get wallet balance?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
Assuming you have a Bitcoin node to execute RPC calls against (i.e. you're running
bitcoind with the RPC turned on), you can do this rather simply with pyjsonrpc:
#!/usr/bin/env python from pyjsonrpc import ServiceProxy bitcoin = ServiceProxy("http://127.0.0.1:8332") # this is your bitcoind node and RPC port bitcoin.username = 'testuser' # rpcuser bitcoin.password = 'testpass' # rpcpassword print(bitcoin.getbalance())