Etherscan Portfolio Viewer
November 8, 2025 ยท View on GitHub
An Ethereum portfolio analysis app that uses the Etherscan API to provide comprehensive address analytics and portfolio tracking. The app features address validation, balance monitoring, transaction history, and token portfolio analysis.
Note that the first widget is utilized to validate the address and then it's grouped to the ones below (although hidden in their parameters).
Setup
-
Install Dependencies:
pip install -r requirements.txt -
Configure API Key (Choose one method):
Method A - Environment Variable:
- Obtain a free API key from Etherscan.io
- Add it to the
.envfile:ETHERSCAN_API_KEY=your_key_here
Method B - Authentication Header:
- Get your API key from Etherscan.io
- Configure OpenBB Workspace with custom header:
X-ETHERSCAN-API-KEY: your_key_here
-
Run the Application:
uvicorn main:app --reload --port 8000 -
Configure in OpenBB Workspace:
- Add the app via backend URL:
http://localhost:8000 - Start with the "Address Validator" widget to enter an Ethereum address
- All other widgets will use the same address parameter
- Add the app via backend URL:
How It Works
Address Validator Widget
- Enter Address: Input any Ethereum address (42 characters starting with 0x)
- Validation: Widget validates format and fetches basic information:
- ๐ Prompt: Instructions for entering a valid address
- โ Valid: Shows ETH balance, account status, and useful links
- โ Invalid: Format error with specific validation feedback
- Parameter Grouping: Address automatically syncs to all other widgets
Authentication
The app supports two authentication methods:
- Environment Variable: Set
ETHERSCAN_API_KEYin your.envfile - Custom Header: Send API key via
X-ETHERSCAN-API-KEYheader
The app will check for the header first, then fall back to the environment variable. This allows flexible deployment where OpenBB Workspace can manage the API key via headers.