Skip to main content

Etherscan.io API wrapper

PyPi Version

An Etherscan.io API wrapper, for Python.

With a default cache supported by requests-cache

Installation

pip3 install etherscan

Usage

import etherscan

es = etherscan.Client(
    api_key='YOUR_API_KEY',
    cache_expire_after=5,
)

eth_price = es.get_eth_price()

eth_supply = es.get_eth_supply()

eth_balance = es.get_eth_balance('0x39eB410144784010b84B076087B073889411F878')

eth_balances = es.get_eth_balances([
    '0x39eB410144784010b84B076087B073889411F878',
    '0x39eB410144784010b84B076087B073889411F879',
])

gas_price = es.get_gas_price()

block = es.get_block_by_number(block_number=12345)

transactions = es.get_transactions_by_address('0x39eB410144784010b84B076087B073889411F878')

token_transations = es.get_token_transactions(
    contract_address='0xEF68e7C694F40c8202821eDF525dE3782458639f',
    address='0xEF68e7C694F40c8202821eDF525dE3782458639f',
)

Metadata

Release files for etherscan2 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etherscan2 0.4.0
File Size Uploaded
etherscan2-0.4.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for etherscan2 0.4.0
File Interpreter ABI Platform
etherscan2-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / etherscan2-0.4.0.tar.gz

Download URL etherscan2-0.4.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9ffe74733c4a65628e7768f15d67d1dbf42b17708a95485f4dff58289054c218
BLAKE2b-256 checksum
How to use checksums
9d898ded6d30da6f1681d9657cd3ed91f9af47f96246d4f31d6159d3f8b16e62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / etherscan2-0.4.0-py3-none-any.whl

Download URL etherscan2-0.4.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92df2dbd5fc871eb9544d1c77544aa914a910b4f40402ac5a709963ecadb46bd
BLAKE2b-256 checksum
How to use checksums
f12062be2e84e334536081ede73f7f77eeda7aa32611c0c1d98f8978d02239d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page