# NOFX: An Open-Source AI Trading Terminal Where the Strategy Is a Language Model

> NOFX is an open-source trading terminal that runs LLM-based trading strategies in a continuous loop, with a Go runtime enforcing hard risk limits that the model cannot override. It targets traders who want to automate decisions across up to nine crypto and financial exchanges using their own LLM API keys and their own infrastructure.

**NoFxAiOS/nofx** — Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.

- Repository: https://github.com/NoFxAiOS/nofx
- Website: https://vergex.trade
- Stars: 12,958 · Forks: 3,049
- Language: Go
- License: AGPL-3.0
- Published: 2026-08-08 · Updated: 2026-08-18 · Language: en
- Canonical page: https://hysenlabs.com/projects/nofxaios-nofx

## What NOFX Is and Who Uses It

NOFX is an open-source trading terminal where the trading strategy is replaced by a language model. The README describes each trader as running a continuous loop: read market structure, decide, execute, record the reasoning. The underlying execution runtime is written in Go, and it enforces hard risk limits around every order the model generates. The model proposes; the Go runtime disposes.

The terminal is backed by the commercial service at vergex.trade, which provides market data via the Claw402.ai and Vergex data stack. This data includes a live direction board, per-symbol direction and direction history, cost-basis and liquidation heatmaps, and real-time market net flow.

The target user is a trader who wants to automate decisions across crypto exchanges without writing traditional technical analysis strategies. The terminal supports nine exchanges (Binance, Bybit, OKX, Hyperliquid, Bitget, KuCoin, Gate, Aster, and Lighter) and eight LLM providers, with the user bringing their own API keys to both.

## The Read-Decide-Execute Loop Architecture

Each strategy runs as a loop that repeats on a schedule. The Autopilot mode, described in the README as the guided starting point, scans the market every few minutes and trades on its own. Every decision is stored with the model's full reasoning, so there is no position without a paper trail.

The Go module (go.mod) shows the runtime uses Go 1.25.11. The dependencies include exchange SDKs for Binance, Bybit, Lighter, Gate, and Hyperliquid, along with go-ethereum for blockchain interaction, Gin for the HTTP API, GORM for database access (with both SQLite and PostgreSQL drivers), and zerolog and logrus for structured logging. The mcp/ directory in the repository suggests Model Context Protocol integration, though the README does not document it.

Decisions come from the Claw402.ai and Vergex data stack, not from raw market feeds the model interprets directly. NOFX follows the board direction and uses the remaining data as execution context. The model receives structured context rather than raw price data.

## Installing NOFX with the One-Line Script

The README gives a single install command:

```bash
curl -fsSL https://raw.githubusercontent.com/NoFxAiOS/nofx/main/install.sh | bash
```

After the script completes, the terminal opens at http://127.0.0.1:3000. The first account registered on the instance becomes the owner. The README describes the first-run flow: put $1 or more in USDC on the Base network into the AI fee wallet the terminal creates, connect Hyperliquid and deposit $12 or more in USDC for trading capital, then start Autopilot.

The .env.example file shows the environment variables the installation requires. The backend port defaults to 8080 and the frontend port defaults to 3000:

```
NOFX_BACKEND_PORT=8080
NOFX_FRONTEND_PORT=3000
JWT_SECRET=your-jwt-secret-change-this-in-production
DATA_ENCRYPTION_KEY=your-base64-encoded-32-byte-key
```

The JWT secret should be a random string of at least 32 characters. The data encryption key is a Base64-encoded 32-byte value used to encrypt API keys and secrets stored in the database. The .env.example includes generation commands using openssl.

## Risk Limits Enforced Outside the Model

The README describes seven categories of limits that the Go runtime applies to every order, independently of what the model requests:

Position limits cap the maximum number of concurrent positions, cap notional size as a ratio of equity, and enforce one position per symbol. Leverage clamps apply hard caps at order-sizing time. Exchange-side protection places stop-loss and take-profit orders on the exchange immediately after every entry. Drawdown auto-close triggers when profitable positions give back too much from their peak. Trade throttling sets minimum hold times, per-symbol re-entry cooldowns, and per-cycle and per-hour entry limits. Safe mode blocks new entries after repeated model failures until the model recovers. Launch preflight verifies model access, wallet funds, strategy, and exchange balances before a trader may start.

The README states explicitly that these limits are enforced in code, outside the model's reach. The model cannot instruct the runtime to override them. This architectural choice separates what the model decides from what the system will actually execute, providing a boundary between LLM output and financial action.

## LLM Providers, Exchange Connections, and Configuration

The README lists eight LLM providers: DeepSeek, OpenAI, Claude, Qwen, Gemini, Grok, Kimi, and MiniMax. Custom endpoints and model names are also supported, which allows using any OpenAI-compatible API. The README notes a "no keys" option but does not detail it further.

For exchange connections, the README lists nine exchanges all marked as available: Binance, Bybit, OKX, Hyperliquid, Bitget, KuCoin, Gate, Aster, and Lighter. The project encourages registration through its partner links, which provide reduced trading fees and fund development.

The Strategy Studio terminal component exposes configuration for style presets, coin universes, indicators, leverage, entry confidence, and custom prompts. The Competition component shows a public leaderboard ranked by realized return, with each entry attributed to its model. This lets users compare strategy performance across different LLM providers without sharing code.

## Deploying NOFX with Docker Compose

The repository provides docker-compose.yml for container-based deployment. The compose file defines two services: `nofx` for the backend API on port 8080 and `nofx-frontend` for the frontend on port 3000. Both use the `unless-stopped` restart policy and include health checks. The backend health check polls `/api/health` on port 8080 every 30 seconds.

The docker-compose.yml mounts the .env file into the container so that the onboarding flow can write the generated wallet keys back to the host file. The compose file notes a security trade-off: this mount means a container RCE could read the .env file. The comment recommends deploying via environment variables only and removing the mount for stricter threat models.

The `AI_MAX_TOKENS=8000` environment variable is hardcoded in the compose file's environment section. The timezone defaults to Asia/Shanghai unless overridden by the `TZ` variable. For production deployment, the repository also provides docker-compose.prod.yml and docker-compose.stable.yml as separate configuration targets.

## NOFX vs Freqtrade and Its AGPL-3.0 License

Freqtrade is a well-known open-source cryptocurrency trading bot written in Python. It uses technical analysis strategies coded as Python classes, where entry and exit signals come from indicators and rules defined by the strategy author. NOFX replaces that coding step with an LLM: the strategy is a prompt and a model, not a function.

The practical difference is that Freqtrade strategies are deterministic and auditable by reading the code. NOFX strategies are probabilistic and auditable by reading the stored reasoning logs. Teams that need reproducible backtesting against historical data should verify whether NOFX's backtesting capabilities meet their needs; the README does not document a backtesting mode.

The NOFX license is AGPL-3.0. This means anyone who runs a modified version of NOFX as a network service must publish the source of their modifications. Teams building a proprietary product on top of NOFX cannot keep their modifications private. The repository includes a DISCLAIMER.md file, which the README does not describe in detail but signals that the project explicitly addresses financial risk disclosures.

## Conclusion

NOFX suits developers and technically sophisticated traders who want a self-hosted, LLM-driven trading loop they can inspect and extend. The AGPL-3.0 license requires that any derivative work distributed to others also be open-source under the same terms, which rules it out for proprietary commercial products built on top of it. Before running it with real funds, verify that the LLM provider you select has the capability to handle the context NOFX sends, that your $1 USDC AI fee wallet is funded on Base network, and that you have reviewed the DISCLAIMER.md file that the repository includes. The terminal last pushed on 2026-09-05 and has no GitHub releases, so stability tracking requires watching the dev branch directly.

## FAQ

### Does NOFX require a paid subscription to use?

NOFX is free and open source. Users bring their own LLM API keys and pay their chosen LLM provider directly. A $1 or more USDC deposit on the Base network is required for the AI fee wallet the terminal creates on first run.

### Which exchanges does NOFX support?

The README lists nine exchanges: Binance, Bybit, OKX, Hyperliquid, Bitget, KuCoin, Gate, Aster, and Lighter, all marked as available.

### Which LLM providers can NOFX use for trading decisions?

The README lists eight providers: DeepSeek, OpenAI, Claude, Qwen, Gemini, Grok, Kimi, and MiniMax. Custom endpoints and model names are also supported, allowing any OpenAI-compatible API.

## Sources

- [Official documentation](https://vergex.trade)
- [Official README](https://github.com/NoFxAiOS/nofx#readme)
- [Project repository](https://github.com/NoFxAiOS/nofx)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/nofxaios-nofx
