Skip to content

EggPool/etherscan-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 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%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy