Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A minimal, yet complete, python API for Etherscan.io.

License

Notifications You must be signed in to change notification settings

jensb89/etherscan-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etherscan-python

A minimal python API for etherscan.io.

Build Status codecov Python 3.8 GitHub


Most of the free webhooks from the Accounts, Contracts, Transactions and Tokens modules are supported. Their example use-cases are summarized here.

Installation

Before proceeding, you should register an account on etherscan.io and generate a personal API key to use.

Assuming conda is already installed on your system, first create the environment:

conda env create -f env.yml

Activate the environment:

conda activate etherscan-python

Then, install the package:

pip install .

Run unittests

conda activate etherscan-python && bash run_tests.sh

Usage

In python, create a client with your personal etherscan.io API key:

from etherscan.client import Client

api_key = YOUR_API_KEY
config_path = "etherscan/configs/stable.json"

client = Client.from_config(config_path, api_key)

Then you can call all available methods, e.g.:

client.get_eth_balance(address="0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a")

> ('40891631566070000000000', 'OK')

Powered by Etherscan.io APIs.

About

A minimal, yet complete, python API for Etherscan.io.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%