A cryptocurrency trading bot with customizable strategies and backtesting capabilities.
- Multiple trading strategies (Grid Trading, Bollinger Bands)
- Real-time market data integration
- Strategy backtesting
- Web-based dashboard
- Parameter optimization
- Paper trading support
hedgebot/
├── docs/ # Documentation
│ └── strategies/ # Trading strategy documentation
├── scripts/ # Utility scripts
├── src/ # Frontend React application
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── layouts/ # Page layouts
│ ├── pages/ # Page components
│ ├── services/ # API services
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── trading_bot/ # Backend Python application
│ ├── api/ # API endpoints
│ ├── core/ # Core trading logic
│ ├── strategies/ # Trading strategies
│ ├── backtesting/ # Backtesting engine
│ └── exchange/ # Exchange integrations
└── config/ # Environment configurations
- Python 3.8+
- Node.js 16+
- npm 7+
-
Clone the repository:
git clone https://github.com/yourusername/hedgebot.git cd hedgebot -
Install Python dependencies:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Install Node.js dependencies:
npm install
-
Create a
.envfile:EXCHANGE_API_KEY=your_api_key EXCHANGE_SECRET_KEY=your_secret_key
Start both backend and frontend:
npm run startOr start them separately:
# Backend
npm run start:backend
# Frontend
npm run start:frontendThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5002
- Run tests:
npm test - Format code:
npm run format - Lint code:
npm run lint - Clean build files:
npm run clean
- Development configuration:
config/development/config.json - Production configuration:
config/production/config.json
See the docs/strategies directory for detailed documentation on each trading strategy:
- Grid Trading Strategy
- Bollinger Bands Strategy
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.