-
Notifications
You must be signed in to change notification settings - Fork 2
Setup
Carl Brown edited this page Dec 18, 2024
·
2 revisions
This guide walks through the process of setting up the Trading System for development and production use.
- .NET 6.0 SDK or later
- Docker and Docker Compose
- Git
- PostgreSQL (for development)
- Visual Studio 2022 or VS Code with C# extensions
-
Clone the Repository
git clone <repository-url> cd tradingsystem
-
Database Setup
# Initialize development database cd scripts ./init-dev-db.sql
-
Configuration
- Copy
appsettings.json.exampletoappsettings.json - Update PostgreSQL connection strings
- Configure exchange API credentials
- Copy
-
Build the Solution
dotnet restore dotnet build
-
Run Tests
dotnet test
-
Build Docker Images
docker-compose build
-
Start Services
# Development docker-compose up -d # Production docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
-
Verify Deployment
- Access monitoring: http://localhost:3000 (Grafana)
- Check health endpoints: http://localhost:8080/health
-
Grafana
- Default credentials in
grafana/grafana.ini - Pre-configured dashboards in
grafana/provisioning/dashboards - Data sources in
grafana/provisioning/datasources
- Default credentials in
-
Prometheus
- Configuration in
prometheus/prometheus.yml - Alert rules in
prometheus/alerts - Recording rules in
prometheus/rules
- Configuration in
-
TradingView Setup
- Configure API credentials in settings
- Set up webhook endpoints
- Configure rate limits
-
Tradovate Setup
- Set up API access
- Configure account credentials
- Set trading permissions
Recommended VS Code extensions:
- C# Dev Kit
- Docker
- REST Client
- GitLens
Common issues and solutions:
-
Database Connection
- Verify PostgreSQL connection strings
- Check PostgreSQL service status
- Confirm database user permissions
- Verify database exists and is accessible
-
Docker Issues
- Clear Docker cache
- Check Docker logs
- Verify port availability
-
Build Errors
- Clear NuGet cache
- Restore packages
- Check SDK version
Key environment variables:
ASPNETCORE_ENVIRONMENT=Development
POSTGRES_CONNECTION=
EXCHANGE_API_KEY=
EXCHANGE_API_SECRET=
MONITORING_ENABLED=true- Review the Architecture documentation
- Explore available Components
- Set up your development environment
- Run the sample strategies