I built an open-source Solana trading bot on Telegram — here's what I learned

# blockchain# web3# opensource# javascript
I built an open-source Solana trading bot on Telegram — here's what I learnedBoti

I recently built a Telegram trading bot for Solana from scratch using Node.js. It's fully...

I recently built a Telegram trading bot for Solana from scratch using Node.js. It's fully open-source, and I wanted to share the architecture and lessons learned.

What it does

The bot lets you trade any Solana token directly from Telegram:

  • Buy/sell tokens by pasting a contract address
  • Real-time trending tokens feed (powered by DexScreener API)
  • Portfolio tracking with profit/loss calculations
  • Wallet management (non-custodial — users control their own keys)
  • Referral system with fee sharing for growth
  • Token analysis with safety scores and momentum indicators

Tech Stack

  • Runtime: Node.js
  • Telegram API: node-telegram-bot-api
  • Swap routing: Jupiter Aggregator (lite-api.jup.ag) for best-price execution
  • Market data: DexScreener API (free, no auth required)
  • RPC: Helius (free tier, 1M credits/month)
  • Blockchain: Solana web3.js for transaction building and signing

Architecture Decisions

Why Jupiter for swaps?

Jupiter aggregates routes across all major Solana DEXes (Raydium, Orca, Meteora, etc.) and finds the best price. Their lite API is free and doesn't require authentication — perfect for a bot.

Why DexScreener for market data?

I initially tried using on-chain data directly via Helius, but the rate limits (10 RPS on free tier) made real-time monitoring impractical. DexScreener's API gives you price, volume, liquidity, and transaction counts — all for free.

Non-custodial wallet design

Each user gets a Solana keypair generated locally. The private key is stored encrypted. Users can export their keys at any time. This is critical for trust — nobody wants to deposit funds into a bot they can't verify.

Lessons Learned

1. Memecoin sniping is negative EV

I spent time building a token sniper that would auto-buy newly graduated pump.fun tokens. After analysis:

  • Win rate: ~6.5%
  • Average loss per trade: -0.03%
  • The buy/sell spread alone (~2%) eats any potential profit

Conclusion: Blind sniping doesn't work. You need sophisticated filtering to be profitable.

2. Circular arbitrage on major pairs is dead

SOL → USDC → USDT → SOL arbitrage returns ~0.01% — not enough to cover transaction fees.

3. DexScreener is underrated for builders

Their free API provides everything you need for a trading bot: token profiles, pair data, trending tokens, and boost information. No API key needed.

4. Jupiter's fee sharing is a real business model

Jupiter offers 50-255 bps fee sharing for integrators. A trading bot can charge 0.5% per swap and earn sustainable revenue.

Revenue Model

The bot charges a 0.5% fee on each swap. The referral system gives users 20% of fees from people they refer.

Try it / Contribute

I'd love feedback from anyone building in the Solana/DeFi space. What features would make this more useful?


Built with Node.js, Jupiter, DexScreener, and Helius. MIT licensed.