Etherscan api
Etherscan v2 api client
Install
pip install etherscan-api-v2
Usage
from etherscan_api import EtherScanApi, get_etherscan_api
from pprint import pprint
# view all supported chains and chain_id
pprint(EtherScanApi.chain_list())
# get api client
etherscan = EtherScanApi(chain_id=1)
etherscan = get_etherscan_api('eth', network='mainnet')
account = '0x3f217aF5b4d5Dc6467598937119E500ab758623a'
usdt = '0x58c885900f2df7a1fb1cc1ec35dea9a1c786cac0'
# get token balance
balance = etherscan.get_token_balance(account, usdt)
# query contract
balance = etherscan.query_contract(usdt, 'balanceOf', account)
Metadata
Release files for etherscan-api-v2 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| etherscan_api_v2-0.3.tar.gz | 15.6 kB | Without provenance | Details for etherscan_api_v2-0.3.tar.gz |
Release files / etherscan_api_v2-0.3.tar.gz
| Download URL | etherscan_api_v2-0.3.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a993990e127faa6face431a67b494230730ed3351c7b37f48c6ff004e24d330f
|
|
BLAKE2b-256 checksum How to use checksums |
eb171fde231ecbbc7c78ef8f6fe7a5fdf701663e475ebf0428b51939793f48f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for etherscan-api-v2 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.