NoFxAiOS/nofx

Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.

NOFX – Open‑source AI‑driven crypto trading terminal

What it is – NOFX is a self‑hosted trading platform where the core decision‑making logic is supplied by a large language model (LLM). A Go‑based runtime continuously reads market data, asks the model for a trade, and then enforces hard risk limits before sending the order to one of nine supported crypto‑perpetual exchanges. Every trade is stored together with the model’s full reasoning, and multiple “traders” can be run side‑by‑side and compared on a public leaderboard.

Key components

  • Frontend – React + TypeScript UI (dashboard, strategy studio, competition view) served at http://127.0.0.1:3000.
  • API server – Go service handling JWT authentication, encrypted storage of exchange credentials, and exposing endpoints for the frontend.
  • Strategy engine – Executes the LLM‑generated prompt, formats it into an order, and passes it to the risk engine.
  • Risk engine – Applies hard limits (position caps, leverage clamps, stop‑loss/take‑profit, draw‑down auto‑close, throttling, safe‑mode) that the model cannot override.
  • AI model layer – Connects to any of eight LLM providers (OpenAI, Claude, Gemini, DeepSeek, Qwen, Grok, Kimi, MiniMax) or to the proprietary Claw402 service, which bills per‑call in USDC.
  • Exchange adapters – Unified connectors for Binance, Bybit, OKX, Hyperliquid, Bitget, KuCoin, Gate, Aster, and Lighter.

How it works

  1. Register & fund – First user becomes the instance owner, funds an on‑chain “AI fee wallet” (≥ $1 USDC) and deposits ≥ $12 USDC on a chosen exchange (e.g., Hyperliquid).
  2. Autopilot – The system polls market data every few minutes, sends a prompt (including direction board data from Claw402) to the selected LLM, receives a trade suggestion, and the Go runtime checks it against all risk rules before executing.
  3. Transparency – Each order is logged with the exact model prompt and response, giving a complete paper trail.
  4. Competition – Users can run multiple traders and compare realized returns on a public leaderboard.

Installation options

  • One‑line script (Linux/macOS) – curl -fsSL https://.../install.sh | bash.
  • Docker compose (Linux/macOS/Windows) – download docker‑compose.prod.yml and run docker compose up -d.
  • Railway deployment button for quick cloud hosting.
  • Build from source (Go 1.21+, Node 18+) – go build for the backend and npm run dev for the frontend.

Supported markets

  • Crypto perpetual contracts on all nine listed exchanges.
  • On Hyperliquid, also tokenized US equities, commodities, indices, FX, and pre‑IPO perpetuals (e.g., TSLA, NVDA, GOLD, SPX, EUR, OPENAI).

Safety mechanisms

Mechanism What it does
Position limits Caps concurrent positions and notional size per equity ratio
Leverage clamps Enforces hard leverage caps regardless of model request
Exchange‑side protection Auto‑places stop‑loss / take‑profit on the exchange after entry
Drawdown auto‑close Closes profitable positions that give back too much from peak
Trade throttling Minimum hold times, per‑symbol cooldowns, hourly entry caps
Safe mode Blocks new entries after repeated model failures
Launch preflight Verifies model access, wallet balances, strategy config before start

Documentation & community

  • Getting‑started guide, architecture overview, strategy module details, FAQ, and troubleshooting docs are in the docs/ folder.
  • Active Telegram community, Twitter/X account, and issue tracker for support.
  • Contribution rewards are tracked via a weighted system (e.g., pinned‑issue PRs earn the most points).

License – AGPL‑3.0 (source‑available, must share modifications under the same license).

Disclaimer – The project is experimental; AI‑generated trading strategies can lose money. Users should trade only funds they can afford to lose and respect each venue’s risk rules.

Related

  • Project
  • Project
  • Project
  • Project
  • Project