OS Trading Engine
Introduction

Nexgent Trading Engine

Nexgent is an open-source, self-hosted trading automation framework for Solana. Deploy your own instance, create trading agents, and execute trades with ultra-low latency.

Dashboard Overview
Trading dashboard showing performance metrics, live positions, and balance history

Why Nexgent?

FeatureDescription
Self-HostedYou deploy and control your own instance. Your data, your keys, your infrastructure.
Open SourceFull source code access. Audit, modify, or extend any feature.
No FeesZero per-transaction fees. Only pay Solana network costs.
Ultra-FastSub-500ms signal processing, sub-1ms stop loss evaluation.

How It Works

Signal → Agent Eligibility → Trade Execution → Position Monitoring
  1. Signal Creation – Trading signals arrive via API
  2. Agent Evaluation – Each agent checks eligibility (balance, config, filters)
  3. Trade Execution – Eligible agents execute via Jupiter Aggregator
  4. Position Management – Real-time monitoring with stop loss, DCA, and auto-close

All state changes broadcast via WebSocket for live dashboard updates.


Key Features

Trading Automation

  • Automated trade execution based on configurable rules
  • Multiple agents with independent strategies
  • Signal filtering by strength, whitelist, and blacklist
  • Position sizing based on balance categories

Risk Management

  • Trailing stop loss with 4 calculation modes (fixed, exponential, zones, custom)
  • DCA (Dollar Cost Averaging) to average down on dips
  • Stale trade detection for auto-closing idle positions
  • Maximum position limits to prevent overexposure

Real-Time Monitoring

  • WebSocket updates for live position tracking
  • Price feeds from Jupiter and Pyth
  • Performance metrics and historical swap analysis
  • Balance tracking across simulation and live wallets

Simulation Mode

  • Risk-free testing with virtual wallets
  • Real price data for accurate P&L simulation
  • Strategy validation before going live
  • Separate automation toggles for sim vs live

Technology Stack

Nexgent is built as a TypeScript monorepo with three packages:

PackagePurpose
nexgent-open-source-trading-engine/backendExpress API, WebSocket server, trading engine
nexgent-open-source-trading-engine/frontendNext.js 15 dashboard with real-time updates
nexgent-open-source-trading-engine/sharedShared types, validators, utilities

Core Technologies:

  • Runtime: Node.js 18+
  • API: Express.js with JWT authentication
  • Database: PostgreSQL with Prisma ORM
  • Cache: Redis for high-performance caching
  • Frontend: Next.js 15 with React Query
  • Trading: Jupiter Aggregator for swaps
  • Prices: Jupiter & Pyth Network

Quick Start

Get Nexgent running locally in 15 minutes:

git clone https://github.com/Nexgent-ai/nexgent-open-source-trading-engine.git
cd nexgent
docker-compose up -d
pnpm install
pnpm dev

Then open http://localhost:3000 to access the dashboard.

See the Quickstart (Local Dev) or Quickstart (Cloud Hosting) for complete setup instructions.


Documentation Sections


For New Users

Getting Started as a Trader

  1. Quickstart (Local) – Deploy Nexgent locally
  2. Quickstart (Cloud) – Deploy to cloud
  3. Core Concepts – Understand how everything works
  4. Simulation vs Live – Test safely before trading
  5. Platform Guide – Create agents, manage wallets, and trade

Community & Support

ResourceLink
GitHubgithub.com/Nexgent-ai/nexgent-open-source-trading-engine (opens in a new tab)
IssuesReport bugs (opens in a new tab)
X (Twitter)@NexgentAI (opens in a new tab)
TelegramJoin Community (opens in a new tab)

License

Nexgent is open-source software released under the GNU General Public License v3.0 (GPL-3.0) (opens in a new tab)