Project Title
telegram-keyword-GATE.IO-automated-binance-listing-spot-buy-example
This project provides a Telegram bot that listens to specified channels for messages announcing new futures launches, spot listings, and Upbit listings, then automatically executes market buy orders on Gate.io. After successful trades, it retrieves market capitalization data from CoinMarketCap and CoinGecko. The bot is designed for automation and quick execution with configurable parameters.
-
Listens for three types of listing messages on Telegram:
- Futures launch announcements containing "futures will launch"
- Spot listing notifications containing "will list"
- Upbit listings containing "UPBIT LISTING" and "KRW"
-
Cleans and formats ticker symbols for Gate.io compatibility
-
Executes market buy orders on Gate.io with adjustable target USDT allocations and cooldown periods
-
Fetches additional asset info:
- Market cap from CoinMarketCap
- Market cap from CoinGecko
- Contract addresses from CoinMarketCap if needed
-
Logs detailed execution steps and errors
-
Configurable via environment variables in a
.env
file
- Python 3.8 or above
- Git
- Gate.io account with API key & secret
- CoinMarketCap API key
- Telegram account with API ID, API hash, and phone number
-
Clone this repository:
git clone https://github.com/yourusername/telegram-keyword-GATE.IO-automated-binance-listing-spot-buy-example.git cd telegram-keyword-GATE.IO-automated-binance-listing-spot-buy-example
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # Mac/Linux venv\\Scripts\\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Copy the example environment file and fill in your credentials:
cp config.env.example config.env
-
Set the following variables in
config.env
:TG_API_ID=<Your Telegram API ID> TG_API_HASH=<Your Telegram API Hash> TG_PHONE=<Your Telegram Phone Number> TARGET_CHAT=<Telegram chat ID to send contract addresses> CHANNELS=<Comma-separated Telegram channel IDs> GATE_API_KEY=<Your Gate.io API key> GATE_API_SECRET=<Your Gate.io API secret> CMC_API_KEY=<Your CoinMarketCap API key>
-
Adjust constants in the script if desired:
INITIAL_TARGET_USDT
: Total USDT to allocate per announcementCOOLDOWN_PERIOD_SECONDS
: Minimum seconds between trades for the same assetFUTURES_MESSAGE_DIVISOR
,UPBIT_MESSAGE_DIVISOR
: Divisors to split allocations
Run the bot:
python bot.py
The bot will connect to Telegram, listen for new messages in configured channels, and automatically process and trade based on message content.
The bot uses Python's logging
module. By default, logs are output at the INFO level. Adjust logging.basicConfig(level=logging.INFO)
in the script to change verbosity.
Contributions are welcome! Please open issues or submit pull requests for bug fixes, improvements, or feature requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m "Add your feature"
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request
This project is open source under the MIT License. See LICENSE for details.
Trading cryptocurrencies carries risk. This bot is provided "as is" without warranty of any kind. Use at your own risk.