A Python Telegram bot that fetches and displays the top 5 newest coins from pump.fun with real-time refresh functionality.
Try it now: @PumpingTbot on Telegram
Click the link above or search for @PumpingTbot in Telegram to start using the bot!
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
Just want to use the bot? Go to @PumpingTbot and start chatting!
Want to run your own instance? Follow the installation guide below.
- 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
- Python 3.8 or higher
- A Telegram Bot Token (obtain from @BotFather)
- Internet connection for fetching coin data
git clone <repository-url>
cd tbotpip install -r requirements.txt-
Copy the example environment file:
copy .env.example .env
-
Edit the
.envfile and add your Telegram Bot Token:TELEGRAM_BOT_TOKEN=your_actual_bot_token_here DEBUG=False
- Start a chat with @BotFather on Telegram
- Send
/newbotand follow the instructions - Choose a name for your bot (e.g., "Pump Fun Coins")
- Choose a username (e.g., "pumpfun_coins_bot")
- Copy the token provided by BotFather
- Paste it in your
.envfile
python main.pyYou should see output like:
π Pump.fun Telegram Bot is starting...
Press Ctrl+C to stop the bot
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
π 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)
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
TELEGRAM_BOT_TOKEN(required): Your Telegram Bot tokenDEBUG(optional): Set toTruefor debug logging
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
The scraper in scraper.py uses BeautifulSoup to parse the pump.fun website. To improve coin detection:
- Inspect the actual HTML structure of pump.fun
- Update the
_parse_coins_from_htmlmethod with proper CSS selectors - Test with different site layouts
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
To test the bot:
- Create a test bot with BotFather
- Use the test bot token in development
- Test all commands and button interactions
- Verify error handling with invalid inputs
"Configuration error: TELEGRAM_BOT_TOKEN environment variable is required"
- Make sure your
.envfile 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
Enable debug logging by setting DEBUG=True in your .env file:
DEBUG=TrueThis will provide detailed logging information to help diagnose issues.
The bot logs important events and errors. Monitor the console output for:
- Startup messages
- User interactions
- Scraping status
- Error messages
- Never commit your
.envfile 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
- 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
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Please check the LICENSE file for details.
For issues and questions:
- Check this README for common solutions
- Review the troubleshooting section
- Check the console logs for error messages
- Open an issue with detailed information about your problem
Happy trading! π Remember to always do your own research before making any investment decisions.