Skip to content

nqb4o/cryptotradebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Trading Bot with Binance Integration

Real-time cryptocurrency trading platform connected to Binance Testnet/Live for automated BTC/USDT trading with multiple quantitative strategies.

✨ Features

Trading

  • 🔗 Real Binance Integration - Execute real orders on Testnet or Live
  • 🤖 Auto Trading - Automated trading based on strategy signals
  • 📊 15+ Trading Strategies - From conservative to aggressive
  • 🛡️ ATR-based Stop Loss - Dynamic risk management
  • 📈 Multi-timeframe Analysis - Higher TF trend filter

Dashboard

  • 📉 Real-time Price Chart - Interactive candlestick with EMA overlays
  • 💰 Portfolio Tracking - Live USDT/BTC balance from Binance
  • 📋 Trade History - Recent executed orders
  • 🎯 Signal Display - Current strategy recommendations

Backtesting

  • 📅 Historical Testing - Test strategies on past data
  • 📊 PnL Chart - Visual profit/loss analysis
  • 📈 Performance Metrics - Win rate, profit factor, drawdown

🛠️ Tech Stack

Layer Technologies
Backend Node.js, Express, Socket.io, ccxt, SQLite
Frontend React 18, Vite, TailwindCSS, TradingView Charts
Exchange Binance API (Testnet/Live)

📁 Project Structure

/tradebot
├── /backend          # API Server & Trading Logic
│   ├── /src
│   │   ├── /services # Core trading services
│   │   ├── /models   # Database models
│   │   └── server.js # Express & Socket.io
│   └── .env.example  # Environment template
│
├── /frontend         # React Dashboard
│   ├── /src
│   │   ├── /components
│   │   ├── /hooks
│   │   └── /services
│   └── package.json
│
└── README.md

🚀 Quick Start

1. Clone & Install

git clone https://github.com/YOUR_USERNAME/tradebot.git
cd tradebot

# Backend
cd backend
npm install

# Frontend
cd ../frontend
npm install

2. Configure Environment

cd backend
cp .env.example .env
# Edit .env with your Binance API keys

Required variables:

BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret
SANDBOX_MODE=true  # true for Testnet, false for Live
PORT=3001

3. Get Binance API Keys

4. Run Application

# Terminal 1 - Backend
cd backend
npm run dev

# Terminal 2 - Frontend
cd frontend
npm run dev

Open http://localhost:5173

📡 API Endpoints

Method Endpoint Description
GET /api/health Health check
GET /api/trades Recent trades
POST /api/trade/execute Manual trade
POST /api/autotrade/toggle Toggle auto-trading
GET /api/strategy/settings Get strategy params
POST /api/strategy/settings Update strategy
POST /api/backtest Run backtest

📈 Trading Strategies

Quantitative

  • Z-Score Mean Reversion
  • Keltner Volatility Breakout
  • VWAP Confluence

Trend Following

  • EMA Crossover
  • Trend Momentum
  • Swing Trade

Mean Reversion

  • RSI + EMA
  • RSI Reversal
  • Bollinger Band Bounce

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages