This Python script is designed for cryptocurrency miners who need to track and monitor their mining statistics across multiple wallets. It fetches wallet stats from zpool.ca, converts mined coins to USD based on live exchange rates, aggregates the data, updates the hashrate history, and sends all relevant information to specified Discord webhooks. This tool is useful for miners who want to keep a close eye on multiple mining operations and receive regular updates directly via Discord.
- Multi-Wallet Management: Handles multiple wallet addresses and coins, allowing for broad monitoring across different cryptocurrencies.
- Real-Time Data: Fetches live data from mining zpool and converts cryptocurrency balances to USD. (Every 10 mins, can be adjusted)
- Automatic Updates: Sends periodic updates to a Discord webhook, formatted with current mining statistics.
- Data Persistence: Maintains a history of hashrates to calculate and compare daily averages.
- Configurable: All settings are managed through a
config.json
file, making it easy to add or remove wallets without altering the script code.
Before you want to run this script yourself, ensure you have the following:
- Python 3.6 or higher
requests
library installed in your Python environment
To set up the script, checkout the release here or follow these steps to run the script on your own:
-
Clone the Repository:
git clone https://github.com/your-username/your-repository.git cd your-repository
-
Create and Activate a Virtual Environment (optional but recommended): For Windows:
python -m venv venv .\\venv\\Scripts\\activate
For Unix or MacOS:
python3 -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install requests
Edit the config.json
file to include your wallet addresses, webhook URLs, and other relevant details. Here is an example of what the configuration might look like:
[
{
"wallet_address": "YourWalletAddress1",
"webhook_url": "https://discord.com/api/webhooks/YourWebhookURL1",
"coin": "ravencoin",
"ticker": "RVN"
},
{
"wallet_address": "YourWalletAddress2",
"webhook_url": "https://discord.com/api/webhooks/YourWebhookURL2",
"coin": "bitcoin",
"ticker": "BTC"
}
]
To use this script, simply run it in your terminal or command prompt:
python crypto_mining_stats_webhook.py
The script will continue running and send updates every 10 minutes. To stop the script, press Ctrl+C
in your terminal.
Contributions to this project are welcome! You can contribute by:
- Reporting a bug
- Submitting a fix
- Proposing new features
- Improving documentation
If you want to contribute, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Distributed under the MIT License. See LICENSE
for more information.
- zpool.ca for providing the mining pool API
- CoinGecko for providing the crypto to fiat conversion rates API
- Discord for enabling webhook integrations