A powerful analytics tool for tracking and analyzing cryptocurrency revenue data using
- Etherscan.io API
- Solscan.io API
- CoinGecko API
- Blockchair API
- Dune Analytics API
- Coinmarketcap API
- DefiLlama API
- Fetch and analyze cryptocurrency revenue data from Dune Analytics
- Process time-series data with daily, monthly, quarterly, and yearly aggregations
- Export results to CSV files for further analysis
- Automatic data caching and error handling
- Support for both fresh and cached query results
- Clone the repository:
git clone https://github.com/yourusername/CryptoLens.git
cd CryptoLens- Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root with your Etherscan API key:
ETHERSCAN_API_KEY=your_api_key_here
Run the main script:
python src/dune_query.pyThe script will:
- Fetch data from Dune Analytics
- Process and aggregate the data by different time periods
- Save results to CSV files:
daily_revenue.csvmonthly_revenue.csvquarterly_revenue.csvyearly_revenue.csv
The script generates four CSV files:
daily_revenue.csv: Daily revenue datamonthly_revenue.csv: Monthly aggregated dataquarterly_revenue.csv: Quarterly aggregated datayearly_revenue.csv: Yearly aggregated data
- Python 3.7+
- dune-client
- pandas
- python-dotenv
MIT License - feel free to use this project for any purpose.
Contributions are welcome! Please feel free to submit a Pull Request.