Skip to main content

get-eth-balance

The site Etherscan allows you retrieve information on accounts and transactions. There is an interface to the Reposten testnet as well. While doing some work on a project I was monitoring the page to view an account balance and ended up creating a script to do the monitoring programmatically.

See blog post at http://blog.bradlucas.com/posts/2017-07-27-ethereum-get-eth-balance-script/

Setup

Create virtual enviroment

$ python3 -m venv env
$ source env/bin/activate

Install required libraries

$ pip install -r requirements.txt

Usage

Command line Arguments:

-t use Ropsten testnet otherwise default to mainnet chain
-a account

Environment variables: Use these in liu of the command line arguments

GET_ETH_BALANCE_CHAIN=[testnet|mainnet]        - Default to mainnet if not set
GET_ETH_BALANCE_ACCOUNT=account

Command line arguments will take precedence

$ python get-eth-balance.py -t -a 0xd60e64afb753583941e1ab42f836ced0d23af2db

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get_eth_balance-0.2.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

get_eth_balance-0.2.5-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file get_eth_balance-0.2.5.tar.gz.

File metadata

  • Download URL: get_eth_balance-0.2.5.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.2

File hashes

Hashes for get_eth_balance-0.2.5.tar.gz
Algorithm Hash digest
SHA256 7aebe9efe339898948cb30d734f84d14b3655342c3e9d856ee168a83e1e79ec6
MD5 5d7a6bb369ba1b9285e41ba5a67a8e6a
BLAKE2b-256 9ae9b964ca108080593a5d0a496cebc8f481c9a28d1b120f16144b7f3ff9194c

See more details on using hashes here.

File details

Details for the file get_eth_balance-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for get_eth_balance-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 858bc3732ce9a3ee75ee3f8420b59c507e85e996dcee161ba63f2a2c2135eaf4
MD5 7d0036f374bed9fcdfc8a0a6ad3a967f
BLAKE2b-256 89e866eef7ed812eb7992457501849a159638d07e9830efe9aad16b7a60fa721

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page