No project description provided
Project description
etherscan-cli
A comprehensive command-line interface for Etherscan, based on the etherscan-api-v2 library.
Features
- Account: Balance, transactions (normal, internal, token, NFT), mined blocks.
- Contract: ABI, source code, creation info, read-only queries.
- Transaction: Get details, receipt, status, send raw transactions.
- Block: Get by number, block rewards, countdown, number by timestamp.
- Token: Total supply, balance, holders.
- Stats: ETH price, total supply, gas price.
- Logs: Query event logs.
- Multi-chain Support: Support for all chains supported by Etherscan v2 API.
- Rich Output: Beautiful tables and syntax-highlighted JSON.
Installation
pip install python-etherscan-cli
Configuration
Set your Etherscan API key as an environment variable:
export ETHERSCAN_API_KEY=your_api_key_here
Or provide it via the --api-key option.
Quick Start
# Get ETH price
etherscan-cli stats price
# Get ETH balance
etherscan-cli account balance 0x...
# List transactions
etherscan-cli account txs 0x... --limit 5
# Get contract ABI
etherscan-cli contract abi 0x...
# List supported chains
etherscan-cli chains
Usage
Usage: etherscan-cli [OPTIONS] COMMAND [ARGS]...
Etherscan CLI - A command line interface for Etherscan API v2.
Options:
--api-key TEXT Etherscan API Key
--chain-id INTEGER Chain ID (default: 1 for Mainnet)
--help Show this message and exit.
Commands:
account Account related commands
block Block related commands
chains List supported chains and their IDs
contract Contract related commands
logs Event logs related commands
stats Stats related commands
token Token related commands
tx Transaction related commands
License
MIT
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
File details
Details for the file python_etherscan_cli-0.1.0.tar.gz.
File metadata
- Download URL: python_etherscan_cli-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb484e5443c442ed9b83b60da3dde768cb02b5f9f8dd64fed9af44c3109f812b
|
|
| MD5 |
d5ee6892129cce850be282619be38a1c
|
|
| BLAKE2b-256 |
9e4b76f4cb8f79c572a359326b1d3e019925c912f11e6565eac9dc36024c3bbf
|