A production-ready VWAP-based automated trading strategy application with REST API backend and React frontend dashboard for TopstepX.

This is a full-stack enterprise application with:
vwap_topstepx/
βββ backend/ # FastAPI backend application
β βββ app/
β β βββ api/ # API routes
β β βββ core/ # Core configuration
β β βββ services/ # Business logic services
β β βββ main.py # Application entry point
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Backend container
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API client
β β βββ App.tsx # Main app component
β βββ package.json # Node dependencies
β βββ Dockerfile # Frontend container
βββ docker-compose.yml # Docker Compose configuration
βββ vwap_strategy.py # Core strategy implementation
βββ config.py # Configuration module
βββ README.md # This file
Clone the repository
cp .env.example .env
Edit .env and add your TopstepX credentials:
PROJECT_X_API_KEY=your_api_key_here
PROJECT_X_USERNAME=your_username_here
docker-compose up -d
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
export PROJECT_X_API_KEY=your_api_key_here
export PROJECT_X_USERNAME=your_username_here
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
cd frontend
npm install
export VITE_API_URL=http://localhost:8000
npm run dev
Configuration is managed through environment variables:
PROJECT_X_API_KEY: TopstepX API keyPROJECT_X_USERNAME: TopstepX usernameVWAP_DEVIATION: Deviation from VWAP (default: 2.0)TIMER_INTERVAL: Order check interval in seconds (default: 1800 = 30 min)CONTRACT_SIZE: Number of contracts per trade (default: 1)INSTRUMENT: Trading instrument symbol (default: βMGCβ)DEBUG: Enable debug mode (default: false)HOST: Backend host (default: 0.0.0.0)PORT: Backend port (default: 8000)The backend provides the following REST API endpoints:
GET /api/v1/status - Get API statusGET /api/v1/status/health - Health checkGET /health - Root health checkGET /api/v1/strategy/status - Get strategy statusPOST /api/v1/strategy/control - Start/stop strategy
{
"action": "start" // or "stop"
}
GET /api/v1/strategy/vwap - Get current VWAP dataGET /api/v1/strategy/positions - Get current positionsGET /api/v1/config - Get current configurationInteractive API documentation is available at:

The application is containerized and ready for production deployment:
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
The application can be deployed to:
backend/app/core/config.py# Backend tests (when available)
cd backend
pytest
# Frontend tests (when available)
cd frontend
npm test
app/api/ - API routes and endpointsapp/services/ - Business logicapp/core/ - Configuration and shared utilitiessrc/components/ - React componentssrc/services/ - API client servicesβ οΈ Production Considerations
project-x-py documentationThis is an enterprise production application for trading purposes.