Real-time monitoring and control interface backend for the Helios quantitative trading bot.
- FastAPI-based REST API
- Real-time WebSocket communication
- SQLite database for data persistence
- Redis for caching and session management
- JWT authentication
- Comprehensive logging and error handling
cd dashboard/backend
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your configuration
python run.py
The API will be available at:
- Main API: http://localhost:8000
- Interactive docs: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
dashboard/backend/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application
│ ├── config.py # Configuration management
│ ├── api/ # API routes
│ ├── core/ # Core utilities
│ │ ├── exceptions.py # Custom exceptions
│ │ └── logging.py # Logging configuration
│ ├── models/ # Database models
│ ├── services/ # Business logic
│ └── websocket/ # WebSocket handlers
├── requirements.txt # Python dependencies
├── .env.example # Environment configuration template
├── run.py # Development server runner
└── README.md # This file
GET /health
- Service health statusGET /
- API information
pytest
The project follows PEP 8 style guidelines.
All configuration is managed through environment variables. See .env.example
for available options.
Logs are written to both console and file (configurable). Log level and file location can be set via environment variables.