Telegram bot for Solana token trading via Moongate API.
/balance- Check wallet portfolio/token SYMBOL- Analyze token (TRACKR format)/trending- Top 3 Solana trending tokens/swap AMT FROM -> TO- Execute swaps with confirmation- Number selection (1,2,3) + amount input for buying
- Fork/push this repo to GitHub
- Create new Railway project
- Connect GitHub repo
- Add environment variables (see below)
- Deploy
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
MOONGATE_JWT=your_jwt_from_wallet.moongate.one
ALLOWED_TELEGRAM_USER_ID=your_telegram_user_id
Telegram Bot Token:
- Message @BotFather
- Create bot → copy token
Moongate JWT:
- Go to https://wallet.moongate.one
- Login → DevTools → Application → Local Storage →
token
Your Telegram ID:
- Message @userinfobot
After deploy, test in order:
/start→ Shows menu/balance→ Shows portfolio/token SOL→ Token info/trending→ Top 3 tokens- Reply
1→ Select token - Reply
5→ Set amount - Click Confirm → Execute swap
- Node.js 18+
- Direct axios polling to Telegram API
- Moongate MCP Server for blockchain ops
- DexScreener API for trending data
- Amplitude for analytics (optional)
index.js- Main bot entry pointmoongate.js- MCP client wrapperanalytics.js- Amplitude trackingpackage.json- Dependencies