Skip to content

manyworldss/Bitcoin_price

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Bitcoin Price Tracker Discord Bot

A Discord bot that tracks Bitcoin prices using the CoinMarketCap API and sends regular updates and price alerts to designated Discord channels.

Features

  • Hourly Bitcoin price updates
  • Customizable price alerts for when Bitcoin crosses specified thresholds
  • Price history tracking and storage
  • Detailed logging system
  • Configurable through JSON file

Setup

  1. Create a config.json file with the following structure:
{
    "cmc_api_key": "your_coinmarketcap_api_key",
    "price_alerts": {
        "above": 50000,
        "below": 40000
    }
}
  1. Install required dependencies:
pip install requests discord.py
  1. Add the bot to your Discord server and create a channel named bitcoin-alerts

Usage

  1. Run the bot:
python bitcoin_tracker.py
  1. The bot will automatically:
    • Post hourly updates in the #bitcoin-alerts channel
    • Send alerts when Bitcoin price crosses configured thresholds
    • Store price history in price_history.json
    • Log activities in bitcoin_tracker.log

Monitoring

  • Check bitcoin_tracker.log for detailed operation logs
  • View price history in price_history.json
  • Monitor updates in the Discord #bitcoin-alerts channel

Note

Make sure to keep your CoinMarketCap API key and Discord bot token secure and never share them publicly.

About

bitcoin price notifications (discord) - PY

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published