Telegram has over 1 billion monthly active users, and crypto trading bots are one of the fastest-growing categories on the platform. Bots like Banana Gun and Trojan have processed over $40 billion in cumulative swap volume, proving that users want to trade tokens without leaving their chat window. Adding token swaps to your own Telegram bot is simpler than you think: a single GET request to swapapi.dev returns ready-to-execute calldata, no API key required.
This guide walks you through building a Telegram bot in TypeScript that fetches swap quotes, displays them to users, and submits on-chain transactions — all from a /swap command.
What You'll Need
Before you start, make sure you have:
Node.js 18+ installed
A Telegram account to create a bot via BotFather
ethers.js v6 for on-chain transaction signing
grammY — a TypeScript-first Telegram bot framework
A wallet private key for signing (use a test wallet with small amounts)
Basic TypeScript and Ethereum knowledge
Discussion
Your thoughts matter!
Your input is valuable—be the first to share it!