Skip to content

TigranGyan/NetTrader

Repository files navigation

.NET PostgreSQL Docker AI ML License

NetTrader SaaS v9

NetTrader is an advanced AI-powered crypto algorithmic trading SaaS platform built on .NET 9. It features a scalable multi-tenant architecture designed to provide professional trading tools to retail and institutional users.

Key Features

  • Multi-Tenant SaaS Architecture: Secure user isolation with individual API key management, subscription tracking, and independent trading loops.
  • AI-Driven Strategy (Gemini v9.2): High-level decision making using Google Gemini 1.5 Pro, featuring Nash Equilibrium-inspired position sizing and Volume Profile-based entry/exit optimization.
  • ML.NET Inference Engine: Real-time HFT signals using Bayesian MCMC-style inference to adapt to market uncertainty.
  • Dynamic Grid & Market Execution: Supports sophisticated Grid trading, Market Long/Short positions, and intelligent trailing stops.
  • Dual-Loop Runtime:
    • Fast Monitor (10s): ROI tracking, Trailing Stop activation, and Emergency Stop protection.
    • Slow AI Cycle (30m): Deep market analysis and portfolio rebalancing.
    • ML Sniper (60s): High-frequency execution based on strong technical confluence.
  • Exchange Support: Native integration with Binance and Bybit Futures (including Testnet and Demo modes).
  • Security: AES-256 encryption for user API keys, JWT with refresh token rotation, and secure multi-tenant data separation.

Tech Stack

  • Framework: .NET 9 (ASP.NET Core + Worker Services)
  • Database: PostgreSQL with EF Core
  • Real-time: SignalR WebSockets
  • AI/ML: Google Gemini API + ML.NET
  • Infrastructure: Docker, Docker Compose, Caddy (Reverse Proxy)

Documentation

Comprehensive documentation is available in the docs/ directory:

Getting Started

1. Prerequisites

  • .NET 9 SDK
  • Docker & Docker Compose
  • PostgreSQL (if running locally)

2. Environment Setup

Copy .env.example to .env and fill in:

  • DBCONNECTIONSTRING
  • JWT_SECRET
  • ENCRYPTION_KEY (32-byte Base64)
  • GEMINI_API_KEY
  • TELEGRAM_BOT_TOKEN

3. Deploy

docker-compose up -d --build

4. Database Migrations

The system applies migrations automatically on startup. For manual updates:

dotnet ef database update --project NetTrader.Infrastructure --startup-project NetTrader.Api

Security Disclosure

API keys are encrypted using AES-256 before storage. Decryption occurs only in-memory within the user-scoped OrderExecutorFactory. We recommend using Binance/Bybit API keys with Trading Permissions Only and IP Whitelisting.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contacts & Support


© 2026 NetTrader. Licensed under MIT.

Releases

No releases published

Packages

 
 
 

Contributors

Languages