Skip to content

BitcoinMonk/btc-ath-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin ATH Discount Bot

A Twitter bot that posts daily updates showing Bitcoin's current price and how far it is from its all-time high.

Example Tweet

Bitcoin: $104,250

ATH: $108,135 (Dec 17, 2024)
Discount: 3.6% below ATH
Upside to ATH: 3.7%

#Bitcoin #BTC

Setup

1. Create Twitter Developer Account

  1. Go to developer.twitter.com
  2. Create a new project and app
  3. Set app permissions to Read and Write
  4. Generate these credentials:
    • API Key
    • API Secret
    • Access Token
    • Access Token Secret

2. Fork/Clone This Repository

git clone https://github.com/YOUR_USERNAME/btc-ath-bot.git

3. Add GitHub Secrets

Go to your repo → Settings → Secrets and variables → Actions → New repository secret

Add these 4 secrets:

  • TWITTER_API_KEY
  • TWITTER_API_SECRET
  • TWITTER_ACCESS_TOKEN
  • TWITTER_ACCESS_SECRET

4. Enable GitHub Actions

The workflow runs daily at 9:00 AM UTC. You can also trigger it manually from the Actions tab.

Local Testing

# Install dependencies
pip install -r requirements.txt

# Dry run (no Twitter credentials = just prints the tweet)
python bot.py

# With credentials
export TWITTER_API_KEY="your_key"
export TWITTER_API_SECRET="your_secret"
export TWITTER_ACCESS_TOKEN="your_token"
export TWITTER_ACCESS_SECRET="your_token_secret"
python bot.py

Customization

  • Post time: Edit .github/workflows/post-daily.yml cron schedule
  • Tweet format: Edit format_tweet() in bot.py
  • Add more data: CoinGecko API returns lots of data (24h change, market cap, etc.)

API Used

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages