This bot automatically buys a newly listed token on MEXC at release time and monitors for Take Profit (TP) and Stop Loss (SL) conditions. Designed for sub-5ms latency, this bot is optimized for real-time execution when hosted on cloud platforms like AWS EC2 (Singapore).
- ✅ Async HTTP requests using
httpx(low latency) - ✅ Full MEXC Spot API compliance
- ✅ Manual input for:
- Trading symbol
- UK-based release time
- Take Profit price
- Stop Loss price
- ✅ Real-time ticker monitoring
- ✅ Automatic Market Buy & Market Sell
- Python 3.9+
- MEXC Spot Trading API key and secret
- Internet connection
pip install httpx pytzCreate a .env file (recommended for production):
MEXC_API_KEY=your_api_key_here
MEXC_API_SECRET=your_api_secret_here
Or export them manually:
export MEXC_API_KEY=your_api_key_here
export MEXC_API_SECRET=your_api_secret_hereRun the script:
python main.pyInput when prompted:
- Symbol: e.g.,
ABCUSDT - UK Release Time: Format
YYYY-MM-DD HH:MM - TP: Take Profit (e.g.,
0.055) - SL: Stop Loss (e.g.,
0.030)
Bot will:
- Wait till release
- Poll until token becomes tradable
- Execute market buy (20 USDT default)
- Monitor TP/SL to sell automatically
- Use AWS EC2 (Singapore region)
- Instance type:
t4g.smallor higher - Add NTP sync for precise execution
- Optional: Wrap in Docker container for stability
Disclaimer: This script interacts with real funds. Use cautiously and at your own risk.