Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pump.fun Telegram Bot πŸš€

A Python Telegram bot that fetches and displays the top 5 newest coins from pump.fun with real-time refresh functionality.

πŸ€– Live Bot

Try it now: @PumpingTbot on Telegram

Click the link above or search for @PumpingTbot in Telegram to start using the bot!

οΏ½ Visual Assets

Bot profile pictures and favicons are available in the assets/ directory:

  • πŸš€ Bot Profile Picture: High-res rocket design for Telegram
  • 🌐 Favicon: Web icon for repository and sites
  • πŸ“± Multiple Formats: SVG (scalable) and conversion tools

�🎯 Quick Start

Just want to use the bot? Go to @PumpingTbot and start chatting!

Want to run your own instance? Follow the installation guide below.

Features ✨

  • Real-time Data: Fetches the latest new coins from pump.fun
  • Interactive Interface: Refresh button for instant updates
  • Rich Information: Shows coin name, symbol, price, market cap, 24h change, and volume
  • Error Handling: Robust error handling with user-friendly messages
  • Clean UI: Well-formatted messages with emojis and markdown

Prerequisites πŸ“‹

  • Python 3.8 or higher
  • A Telegram Bot Token (obtain from @BotFather)
  • Internet connection for fetching coin data

Installation πŸ”§

1. Clone or Download the Project

git clone <repository-url>
cd tbot

2. Install Dependencies

pip install -r requirements.txt

3. Set up Environment Variables

  1. Copy the example environment file:

    copy .env.example .env
  2. Edit the .env file and add your Telegram Bot Token:

    TELEGRAM_BOT_TOKEN=your_actual_bot_token_here
    DEBUG=False

4. Get a Telegram Bot Token

  1. Start a chat with @BotFather on Telegram
  2. Send /newbot and follow the instructions
  3. Choose a name for your bot (e.g., "Pump Fun Coins")
  4. Choose a username (e.g., "pumpfun_coins_bot")
  5. Copy the token provided by BotFather
  6. Paste it in your .env file

Usage πŸš€

Starting the Bot

python main.py

You should see output like:

πŸš€ Pump.fun Telegram Bot is starting...
Press Ctrl+C to stop the bot

Bot Commands

Once the bot is running, users can interact with it using:

  • /start - Welcome message and refresh button
  • /refresh - Get the latest coin data
  • /help - Show detailed help information
  • πŸ”„ Refresh Button - Click to refresh coin data

Example Output

πŸš€ Top 5 New Coins from Pump.fun πŸš€
πŸ“… Updated: 14:30:25 UTC

1. PEPE2.0 (PEPE)
πŸ’΅ Price: $0.00012
πŸ“Š Market Cap: $1.2M
🟒 24h: +15.6%
πŸ“ˆ Volume: $450K

2. DogeCoin Fork (DOGE2)
πŸ’΅ Price: $0.000089
πŸ“Š Market Cap: $890K
πŸ”΄ 24h: -2.3%
πŸ“ˆ Volume: $230K

... (up to 5 coins)

Project Structure πŸ“

tbot/
β”œβ”€β”€ πŸ“ Core Application Files
β”‚   β”œβ”€β”€ main.py                    # Entry point with signal handling
β”‚   β”œβ”€β”€ bot.py                     # Telegram bot logic with security integration
β”‚   β”œβ”€β”€ scraper.py                 # pump.fun web scraping functionality
β”‚   β”œβ”€β”€ config.py                  # Configuration management with security settings
β”‚   └── security.py                # πŸ†• Security monitoring and protection system
β”‚
β”œβ”€β”€ πŸ“ Configuration & Environment
β”‚   β”œβ”€β”€ .env                       # Your environment variables (TOKEN, etc.)
β”‚   β”œβ”€β”€ .env.example               # Environment variables template
β”‚   β”œβ”€β”€ requirements.txt           # Python dependencies
β”‚   └── .gitignore                 # Git ignore rules (includes security files)
β”‚
β”œβ”€β”€ πŸ“ Deployment & Infrastructure
β”‚   β”œβ”€β”€ Dockerfile                 # Docker container configuration
β”‚   β”œβ”€β”€ Procfile                   # Railway deployment process file
β”‚   └── DEPLOY.md                  # Deployment instructions
β”‚
β”œβ”€β”€ πŸ“ Security & Testing
β”‚   β”œβ”€β”€ test_security.py           # πŸ†• Security system testing suite
β”‚   β”œβ”€β”€ basic-sec-hardening.md     # πŸ†• Security implementation documentation
β”‚   
β”‚
β”œβ”€β”€ πŸ“ Visual Assets
β”‚   └── assets/
β”‚       β”œβ”€β”€ bot-profile-512.svg    # Bot profile image (vector)
β”‚       β”œβ”€β”€ bot-profile-512.png    # Bot profile image (raster)
β”‚       β”œβ”€β”€ favicon.svg            # Bot favicon
β”‚       β”œβ”€β”€ index.html             # Asset preview page
β”‚       └── README.md              # Asset documentation
β”‚
└── πŸ“ Documentation
    └── README.md                  # Main project documentation

Configuration βš™οΈ

Environment Variables

  • TELEGRAM_BOT_TOKEN (required): Your Telegram Bot token
  • DEBUG (optional): Set to True for debug logging

Scraper Settings

The bot is configured to:

  • Fetch data from pump.fun with newest coins first
  • Display top coins
  • Timeout after 30 seconds for web requests
  • Use a realistic User-Agent header

Development πŸ› οΈ

Extending the Scraper

The scraper in scraper.py uses BeautifulSoup to parse the pump.fun website. To improve coin detection:

  1. Inspect the actual HTML structure of pump.fun
  2. Update the _parse_coins_from_html method with proper CSS selectors
  3. Test with different site layouts

Adding Features

Some ideas for enhancements:

  • Add coin filtering by market cap or volume
  • Implement price alerts
  • Add historical data tracking
  • Support for other DEX platforms
  • Database storage for coin history

Testing

To test the bot:

  1. Create a test bot with BotFather
  2. Use the test bot token in development
  3. Test all commands and button interactions
  4. Verify error handling with invalid inputs

Troubleshooting πŸ”§

Common Issues

"Configuration error: TELEGRAM_BOT_TOKEN environment variable is required"

  • Make sure your .env file exists and contains your bot token
  • Verify the token format (should start with a number followed by a colon)

"Error fetching data from pump.fun"

  • Check your internet connection
  • The pump.fun website might be temporarily unavailable
  • The site structure may have changed (requires scraper updates)

Bot doesn't respond to commands

  • Verify the bot is running without errors
  • Check that you're messaging the correct bot
  • Ensure the bot token is valid

Debug Mode

Enable debug logging by setting DEBUG=True in your .env file:

DEBUG=True

This will provide detailed logging information to help diagnose issues.

Logs

The bot logs important events and errors. Monitor the console output for:

  • Startup messages
  • User interactions
  • Scraping status
  • Error messages

Security Considerations πŸ”’

  • Never commit your .env file or expose your bot token
  • The bot doesn't store user data, but be mindful of privacy
  • Consider rate limiting for high-traffic scenarios
  • Keep dependencies updated for security patches

Legal and Disclaimer βš–οΈ

  • This bot is for educational and informational purposes only
  • Cryptocurrency investments carry risk - always DYOR (Do Your Own Research)
  • The bot scrapes publicly available data from pump.fun
  • Respect pump.fun's terms of service and rate limits
  • No financial advice is provided by this bot

Contributing 🀝

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License πŸ“„

This project is open source. Please check the LICENSE file for details.

Support πŸ’¬

For issues and questions:

  1. Check this README for common solutions
  2. Review the troubleshooting section
  3. Check the console logs for error messages
  4. Open an issue with detailed information about your problem

Happy trading! πŸš€ Remember to always do your own research before making any investment decisions.

About

πŸš€ Telegram bot that fetches and displays the top 5 newest coins from pump.fun with real-time refresh functionality. Built with Python using python-telegram-bot library. Try it: @PumpingTbot

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages