nofx README

项目的 README,来自 github.com/NoFxAiOS/nofx。合并为一个 markdown 文件:README.md。

nofx — Intelligence that trades. An open trading system you run yourself.

Frontier · Get started · Documentation · Community

GitHub stars License: AGPL-3.0 Telegram community

English · 中文 · 日本語 · 한국어 · Русский · Українська · Tiếng Việt

NOFX is an open-source trading system you run on your own machine. Use Frontier to work through a trade with AI, compare entries on a chart and approve the order yourself. Use Autopilot to run a strategy continuously. Both use your configured models and exchange accounts.

Built with Vergex. AI and data access through Claw402.

Run locally

One-line install — Linux / macOS

Install and start Docker with Compose, then run:

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

Open http://127.0.0.1:3000 in your desktop browser.

The installer generates missing environment keys and starts NOFX using published Docker images. No Go or Node.js setup is needed. Continue with your first session, or see source builds and other options.

Frontier

A chart, a conversation and a trade you can inspect before placing it.

  1. Choose a market. Browse top-volume instruments, search native exchange symbols or use the Binance AI500 list. Stock-linked markets appear where supported by the venue.
  2. Compare ways to enter. Request market, limit, weighted ladder and TWAP plans. See entry prices, stop loss, targets, leverage, position value and estimated margin together.
  3. Review and trade. Select a plan to focus the chart. Review the current account and order details, then explicitly approve execution.
  4. Manage the position. Check live positions and exchange orders below the chart, with controls for manual entries and closing positions.

Frontier supports Binance USDT perpetuals, Hyperliquid, OKX and Bitget. You can browse public markets before connecting an execution account; trading requires a matching account. Generating a plan does not submit an order.

Entry How it works
Market Enter at the available market price after approval; the displayed entry is an estimate.
Limit Submit an entry at a chosen price.
Ladder Split the position across weighted price levels.
TWAP Release a finite sequence of orders over time, within the approved price limits.

Limit orders and scheduled slices may remain unfilled. Execution details and recovery.

Autopilot

For strategies you want to run continuously, configure a trader with a model, exchange account and strategy. Autopilot reads the market, makes decisions and routes orders through the NOFX exchange runtime. The Dashboard shows positions, performance and decision history.

Frontier requires approval for each trade. Autopilot can place trades while it is running. Starting or stopping Autopilot is a separate action.

Workspace What you do there
Config Connect models, fund the AI wallet and manage trading accounts.
Frontier Explore markets, compare entry plans and place reviewed orders.
Dashboard Follow your running traders, positions and decision history.
Strategy Configure market selection, indicators, sizing and trading instructions.
Leaderboard Compare published trader performance.

Your first session

  1. Create your local account. Sign in to the instance you just started.
  2. Set up AI in Config. Choose a model. With Claw402, create or import an AI fee wallet, save its private key and fund its address with USDC on Base. This balance pays for model and paid-data requests.
  3. Add a trading account. Connect the exchange you want to use. Check its account equity and available balance. Trading funds stay separate from your AI fee wallet.
  4. Open Frontier. Select the exchange, account and market. Generate plans, compare them on the chart and review an order when you are ready.

For continuous trading, configure and start Autopilot separately.

Updating an installer-based installation

After stopping active Autopilot traders and reviewing any running Frontier execution, run these commands from your installation directory (by default ~/nofx):

docker compose pull
docker compose up -d

Keep .env and the data/ directory when upgrading; they contain configuration, encryption material and saved application state.

After restarting, check positions and orders at the exchange and reconcile any execution marked as needing attention before placing another trade. Stopping a process does not close its positions.

Source builds and other options

Developers: build and update from source

Use this option when developing NOFX or testing source changes before published images are updated. Install Git and Docker with Compose, and start Docker:

git clone --recurse-submodules https://github.com/NoFxAiOS/nofx.git
cd nofx
./start.sh start --build

The startup script creates .env when needed and generates missing encryption keys. If you cloned without submodules, run git submodule update --init web/vendor/charting before building. TradingView chart assets are subject to their applicable license; see chart integration notes.

To update a source installation, stop active Autopilot traders and review running Frontier execution, then:

git pull --ff-only
git submodule update --init web/vendor/charting
./start.sh start --build
Windows, Railway and remote deployments

Windows

Use Docker Desktop and a Bash environment such as WSL2, then run the one-line installer above.

Railway

Deploy on Railway

Remote deployments

All Compose configurations (source, production and stable) bind the frontend and API to 127.0.0.1 by default. For remote access, use an SSH tunnel (ssh -N -L 3000:127.0.0.1:3000 user@your-server, then open http://127.0.0.1:3000) or an authenticated HTTPS reverse proxy. Complete first-time registration through the tunnel before allowing other users to reach the site. Do not expose an uninitialized installation publicly.

The native Go server also defaults to 127.0.0.1 (NOFX_API_BIND_ADDRESS). Docker explicitly listens on its internal interface so the frontend proxy can reach it; NOFX_BIND_ADDRESS controls the host-published ports independently.

Upgrade notice: previously published ports may become loopback-only when containers are recreated with the new Compose configuration. Set up your tunnel/HTTPS proxy first; do not restore public plaintext HTTP just to make the old URL work. NOFX_BIND_ADDRESS is an explicit override for secured network deployments. TLS must cover browser-to-proxy traffic; application field encryption (TRANSPORT_ENCRYPTION) does not protect login passwords or bearer tokens and is not a substitute for HTTPS.

Forwarded client IP headers are ignored by default. If using a reverse proxy, set NOFX_TRUSTED_PROXIES to its exact IPs/CIDRs only, and have the proxy overwrite or correctly append the real connecting client address. Never trust 0.0.0.0/0, ::/0, or a network that contains untrusted clients. Without this setting, users behind the proxy share the login throttle; authentication still works. Password changes (including CLI resets) invalidate existing sessions; sign in again afterward. Logout revocations are stored in the database and survive restarts.

This security upgrade requires a fresh web login once: old tokens without unique session IDs are rejected, preventing old in-memory logout records from being lost and sessions revived on restart. Accounts, passwords and trading records are preserved.

Development without Docker

Use the Go version specified in go.mod, Node.js 24 as used by the frontend Docker build, and TA-Lib. Initialize the charting submodule before starting the frontend. Configure the environment using .env.example.

# Backend
go build -o nofx .
./nofx

# Frontend, in a second terminal
cd web
npm ci
npm run dev

Models and data

Frontier and Autopilot reuse models configured in NOFX. Claw402 provides access to multiple models with usage settled in USDC on Base; choose the model in Config and switch it in the workspace.

Exchange prices and candles come from the selected venue. AI500 and supported holder analytics use paid Claw402 routes. Data availability depends on the market and provider: a Hyperliquid holder dataset is not a substitute for Binance, OKX or Bitget data. The activity stream shows data reads and planning progress.

AI fees, paid-data fees and exchange trading funds are separate. Model requests can incur charges even when no trade is placed.

Exchanges

Frontier currently exposes Binance, Hyperliquid, OKX and Bitget. The broader NOFX runtime also includes Bybit, Gate, KuCoin, Aster and Lighter. Available products, order types and account permissions depend on the exchange.

The links below are partner registration links that support development. Fee offers are set by each exchange.

Exchange Status Partner link
Binance ✅ Register
Bybit ✅ Register
OKX ✅ Register
Hyperliquid ✅ Register
Bitget ✅ Register
KuCoin ✅ Register
Gate ✅ Register
Aster ✅ Register
Lighter ✅ Register

How execution works

Plans and strategy decisions use the existing NOFX exchange adapters. The model does not receive wallet private keys or exchange credentials in its prompt.

Architecture

Desktop browser
  Frontier · Config · Dashboard · Strategy
                    │
                NOFX API
                    │
       ┌────────────┴────────────┐
  Frontier planning         Autopilot
  Review and approval       Strategy loop
       └────────────┬────────────┘
              Shared execution
              Exchange adapters
                    │
             Your trading accounts

Models and paid data: NOFX provider clients · Claw402
Storage: local configuration, plans and execution records
Earlier interface walkthrough

This video shows an earlier version of the interface. Navigation and visual design have since changed.

https://github.com/user-attachments/assets/3310f495-14c5-4586-a1cc-3d32e44aa505

Brand assets

Documentation

Guide Contents
Frontier Planning, live execution, data and recovery
Getting started Deployment and exchange API guides
Architecture System design and module index
Strategy module Coin selection, AI prompts and execution
FAQ Common questions
Troubleshooting Diagnosing common issues

Community

Telegram · Twitter/X · Issues · vergex.trade · Live dashboard

Contributing

Code, documentation, translations, and bug reports are all welcome — see the Contributing Guide, Code of Conduct, and Security Policy.

NOFX tracks meaningful contributions and intends to reward contributors as the ecosystem grows. Priority issues carry higher weight.

Contribution Weight
Pinned Issue PRs ★★★★★★
Code (Merged PRs) ★★★★★
Bug Fixes ★★★★
Feature Ideas ★★★
Bug Reports ★★
Documentation ★★
Contributors

Sponsors

Become a sponsor


If NOFX is useful to you, a star helps other traders find it.

Star History Chart

License

AGPL-3.0

Automated trading involves substantial risk. AI-driven strategies are experimental and can lose money. Size positions appropriately, understand each venue, and never trade funds you cannot afford to lose. Full disclaimer.

nofx (NoFxAiOS/nofx)

正在搜索数据库…

13.4K ·GitHub
这是什么?NOFX 是一个开源、自托管的 AI 交易终端,由语言模型充当交易策略,自动交易加密货币、美股、大宗商品和外汇,同时由 Go 运行时强制执行模型无法覆盖的硬性风险限制。
这是云服务,还是需要在我自己的电脑上运行的软件?这是自托管软件,需要你在自己的电脑或服务器上运行;包括交易所凭证在内的所有数据都保存在该机器本地。
我该怎么把它跑起来?在 Linux/macOS 上使用提供的安装脚本安装(或通过 Railway 或 Docker 部署,Windows 上需要 Docker Desktop),以所有者身份注册第一个账户,然后按照引导步骤启动:向 AI 手续费钱包充入至少 1 美元的 Base 链 USDC,连接 Hyperliquid 等交易所,存入至少 12 美元的 USDC,然后启动 Autopilot。
运行它是否需要我自己的 AI 模型 API 密钥?你可以自带 DeepSeek、OpenAI、Claude、Qwen、Gemini、Grok、Kimi 或 MiniMax 的密钥;也可以完全不用密钥,改为通过 Claw402 按次付费,它使用 x402 协议以 USDC 计量用量,只需要一个 Base 链上的钱包。
AI 交易会不会没有任何安全保障?不会——每笔订单都要经过代码强制执行的限制,模型无法覆盖,包括仓位和杠杆上限、自动止损/止盈、回撤自动平仓、交易频率限制,以及在模型反复失败后阻止新开仓的安全模式。
我的交易所凭证会去哪里?凭证会加密存储,并且永远不会离开你的电脑,因为整个系统都在本地运行。
AGPL-3.0 许可证对我意味着什么?NOFX 依据 AGPL-3.0 免费开源,但项目明确指出,自动化交易存在真实的财务风险,AI 驱动的策略可能会亏损。
NOFX 实际能交易哪些市场?支持的九家交易所(Binance、Bybit、OKX、Hyperliquid、Bitget、KuCoin、Gate、Aster、Lighter)均可交易加密货币永续合约;此外,在 Hyperliquid 上还可以交易代币化的美股、大宗商品、指数、外汇,以及 IPO 前永续合约,如 TSLA、NVDA、GOLD 和 SPX。
我能同时运行多个交易策略吗?可以,你可以同时运行多个交易者,使用不同的模型或策略,并在公开排行榜上比较它们的表现,排名依据是已实现收益率。
AI 的决策有审计记录吗?每个决策都会连同模型的完整推理过程一起存储,因此没有任何持仓是在没有记录理由的情况下建立的。
我能自定义交易者的行为吗?Strategy Studio 允许你为每个交易者设置风格预设、币种范围、指标、杠杆、入场信心度和自定义提示词。
作者
NoFxAiOS
大小
70.4 MB
星标
13.4K
更新
提交Nov 04
时长
1年
提交 · 90 天