A professional-grade trading bot and DEX platform for Binance Smart Chain
BSC Trading Bot is an enterprise-grade automated trading platform for Binance Smart Chain with integrated BianDEX - a complete decentralized exchange solution.
- ✅ Production Ready - Battle-tested, comprehensive error handling
- ✅ Modular Architecture - Independent or combined deployment
- ✅ Real Data - DexScreener, CoinGecko, PancakeSwap integration
- ✅ Regulatory Compliant - Geographic separation ready
- ✅ Full Stack - Backend + Frontend + Smart Contracts
- Automated Trading - PancakeSwap and DEX integration
- Batch Wallet Management - Create, import, export wallets
- Smart Strategies - Grid, DCA, arbitrage
- Group Operations - Organize by groups and tags
- Batch Transfers - 1-to-1, 1-to-many, many-to-many
- Complete DEX - Swap, liquidity, farming
- LP Mining - Stake LP tokens for rewards
- DAO Governance - Community decision making
- Analytics - CoinGecko-backed real-time metrics with automatic fallback
- Audited Contracts - 12 contracts, 3500+ LOC
- Modern UI - Responsive NextUI design
- Multi-language - Chinese & English
- Web3 - WalletConnect, MetaMask
- Real-time - WebSocket updates
- Secure - JWT auth, encrypted keys
- Node.js >= 18.0.0
- npm or yarn
- SQLite or PostgreSQL
# 1. Clone repository
git clone <repository-url>
cd BNB
# 2. Install dependencies
npm install
cd frontend && npm install && cd ..
# 3. Configure environment
cp .env.example .env
# Edit .env with your settings
# 4. Initialize database
npm run migrate
# 5. Start services
# Backend defaults to authenticated mode. Set DISABLE_AUTH=true only when you explicitly want to bypass auth in local debugging.
npm run server:dev # Terminal 1: Backend
cd frontend && npm run dev # Terminal 2: Frontend- Frontend: http://localhost:10004
- Backend: http://localhost:10001
- API Health: http://localhost:10001/api/health
# Full platform (default)
ENABLE_TRADING_BOT=true
ENABLE_BIANDEX=true
# Bot only
npm run dev:bot
# DEX only
npm run dev:dex# BSC Mainnet
CHAIN_ID=56
RPC_URL=https://bsc-dataseed1.binance.org/
# BSC Testnet
CHAIN_ID=97See .env.example for all options.
POST /api/auth/nonceto obtain a one-time nonce (response includes the exact message to sign).- Sign
Sign in to BSC Trading Bot\nAddress: {wallet}\nNonce: {nonce}with the target wallet. POST /api/auth/loginwithwalletAddress,nonce, andsignatureto receive a JWT.- Include
Authorization: Bearer <token>for all/api/v1/*and/api/tradingendpoints. - Development shortcuts: explicitly set
DISABLE_AUTH=trueorALLOW_DEV_LOGIN=truewhen you need to bypass auth locally.
- Backend WebSocket server listens on
ws://<host>:10001/wsby default. - Set
NEXT_PUBLIC_WS_URLif the frontend should connect to a custom WebSocket endpoint.
npm run server:dev
cd frontend && npm run devOption 1: Quick Deploy
./scripts/deploy.sh productionOption 2: PM2
npm run build
pm2 start npm --name "bsc-bot" -- run start:fullOption 3: Docker
docker-compose up -dOption 4: Separate Deployment
# Server 1 - Bot only
ENABLE_BIANDEX=false npm run start:bot
# Server 2 - DEX only
ENABLE_TRADING_BOT=false npm run start:dexSee SEPARATION_GUIDE.md for details.
- API Documentation - Complete API reference
- Architecture Guide - System design
- Deployment Guide - Deployment scenarios
- Separation Guide - Independent deployment
- Project Summary - Feature overview
# 1. Run security check
./scripts/security-check.sh
# 2. Update secrets
JWT_SECRET=<64+ chars random string>
ENCRYPTION_PASSWORD=<32+ chars random string>
# 3. Configure production settings
NODE_ENV=production
DISABLE_AUTH=false
LOG_LEVEL=warn- JWT Authentication
- AES-256 Encryption
- Rate Limiting
- Helmet.js Headers
- CORS Protection
- SQL Injection Prevention
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | System health |
/api/v1/wallets/list |
GET | List wallets |
/api/v1/wallets/generate |
POST | Create wallets |
/api/v1/wallets/batch-transfer |
POST | Batch transfer |
/api/trading/quote |
POST | Get quote |
/api/trading/execute |
POST | Execute trade |
/api/dashboard/overview |
GET | Dashboard metrics |
Full API docs: docs/API.md
├── src/ # Backend source
├── frontend/ # Next.js frontend
├── contracts-project/# Smart contracts
├── scripts/ # Deployment scripts
├── data/ # Database & exports
└── docs/ # Documentation
npm run server:dev # Start backend dev
npm run dev:bot # Bot only dev
npm run dev:dex # DEX only dev
npm run build # Build backend
npm run migrate # Run migrations
npm test # Run tests- Fork the repository
- Create feature branch
- Make changes
- Run tests
- Create pull request
MIT License - see LICENSE
- PancakeSwap - DEX integration
- Next.js - Frontend framework
- ethers.js - Ethereum library
- NextUI - UI components
- Issues: GitHub Issues
- Docs: See docs/ directory
- Email: support@yourdomain.com
Q4 2025
- Mobile application
- Advanced analytics
- Multi-chain support
Q1 2026
- Institutional features
- White-label solution
- Advanced strategies
Built with ❤️ for the BSC Community