Etherscan.io API wrapper
Project description
Etherscan.io API wrapper
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',
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
etherscan2-0.4.0.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file etherscan2-0.4.0.tar.gz
.
File metadata
- Download URL: etherscan2-0.4.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffe74733c4a65628e7768f15d67d1dbf42b17708a95485f4dff58289054c218 |
|
MD5 | 3bda4ebcae0415c944ff384edcde3a02 |
|
BLAKE2b-256 | 9d898ded6d30da6f1681d9657cd3ed91f9af47f96246d4f31d6159d3f8b16e62 |
File details
Details for the file etherscan2-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: etherscan2-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92df2dbd5fc871eb9544d1c77544aa914a910b4f40402ac5a709963ecadb46bd |
|
MD5 | 6316acd8fb4de7dec5811e9ebbe8b698 |
|
BLAKE2b-256 | f12062be2e84e334536081ede73f7f77eeda7aa32611c0c1d98f8978d02239d1 |