SnowingFox/open-nof1.ai
Tentang
Platform perdagangan AI open source di pasar nyata,
Bisnis dan keuanganYang dapat Anda lakukan
- ๐ Real-time Trading: Automated cryptocurrency trading on Binance via CCXT
- ๐ Live Dashboard: Beautiful real-time charts showing account performance
- ๐ง AI Decision Making: Complete chain-of-thought reasoning for every trade
- ๐น Multi-Asset Support: Trade BTC, ETH, SOL, BNB, and DOGE
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- +1
- dalam 15 hari
- +1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli๐ค Open-nof1.ai
An open-source implementation of nof1.ai's Alpha Arena - A benchmark platform for evaluating AI models' cryptocurrency trading capabilities with real money in real markets.

๐ What is Alpha Arena?
Alpha Arena is a revolutionary benchmark that tests AI models where it matters most: real financial markets with real money. Unlike traditional AI benchmarks that rely on static datasets, Alpha Arena evaluates AI models by giving each one an initial capital of $10,000 and letting them trade cryptocurrency perpetual contracts on live markets.
Why markets are the ultimate test of intelligence:
- Markets are dynamic, adversarial, and open-ended
- They challenge AI in ways that static benchmarks cannot
- Real-time decision-making under uncertainty reveals true capabilities
- Risk management and strategic thinking are essential
๐ฏ Features
This open-source implementation currently focuses on running the DeepSeek trading model with the following capabilities:
- ๐ Real-time Trading: Automated cryptocurrency trading on Binance via CCXT
- ๐ Live Dashboard: Beautiful real-time charts showing account performance
- ๐ง AI Decision Making: Complete chain-of-thought reasoning for every trade
- ๐น Multi-Asset Support: Trade BTC, ETH, SOL, BNB, and DOGE
- ๐ Performance Tracking: Detailed metrics, trade history, and profit/loss tracking
- ๐ Full Transparency: Every decision, prompt, and reasoning is logged and visible
- โก Cron Jobs: Automated 20-second metric collection and 3-minute trading intervals
๐๏ธ Tech Stack
- Framework: Next.js 15 with App Router & Turbopack
- AI SDK: Vercel AI SDK with DeepSeek integration
- Database: PostgreSQL with Prisma ORM
- Trading: CCXT for exchange connectivity
- Charts: Recharts with shadcn/ui
- Styling: Tailwind CSS v4
- Runtime: Bun for fast package management
๐ Getting Started
Prerequisites
- Bun installed
- PostgreSQL database
- Binance API credentials (for live trading)
- DeepSeek API key
Installation
Clone the repository
git clone https://github.com/snowingfox/open-nof1.ai.git cd open-nof1.aiInstall dependencies
bun installSet up environment variables
cp .env.example .envFill in your
.envfile:# Application NEXT_PUBLIC_URL="http://localhost:3000" # Database DATABASE_URL="postgresql://postgres:password@localhost:5432/nof1" # AI Models DEEPSEEK_API_KEY="your_deepseek_api_key" OPENROUTER_API_KEY="your_openrouter_api_key" # Optional: for additional models # Market Research (Optional) EXA_API_KEY="your_exa_api_key" # For enhanced market analysis # Trading (Binance) BINANCE_API_KEY="your_binance_api_key" BINANCE_API_SECRET="your_binance_secret" BINANCE_USE_SANDBOX="true" # Set to "false" for live trading # Trading Configuration START_MONEY=10000 # Initial capital in USDT (e.g., 10000 = $10,000 USDT) # Cron Job Authentication CRON_SECRET_KEY="your_secret_token"Set up the database
bunx prisma generate bunx prisma db pushRun the development server
bun devSet up cron jobs (for automated trading)
You'll need to set up external cron jobs or use a service like Vercel Cron to call these endpoints:
POST /api/cron/20-seconds-metrics-interval- Collect metrics every 20 secondsPOST /api/cron/3-minutes-run-interval- Execute trading logic every 3 minutes
Example crontab:
# Metrics collection (every 20 seconds) * * * * * curl -X POST http://localhost:3000/api/cron/20-seconds-metrics-interval -H "Authorization: Bearer YOUR_CRON_SECRET_KEY" * * * * * sleep 20 && curl -X POST http://localhost:3000/api/cron/20-seconds-metrics-interval -H "Authorization: Bearer YOUR_CRON_SECRET_KEY" * * * * * sleep 40 && curl -X POST http://localhost:3000/api/cron/20-seconds-metrics-interval -H "Authorization: Bearer YOUR_CRON_SECRET_KEY" # Trading execution (every 3 minutes) */3 * * * * curl -X POST http://localhost:3000/api/cron/3-minutes-run-interval -H "Authorization: Bearer YOUR_CRON_SECRET_KEY"
Open http://localhost:3000 to view the dashboard.
๐ Project Structure
open-nof1.ai/
โโโ app/
โ โโโ api/
โ โ โโโ cron/ # Automated job endpoints
โ โ โโโ metrics/ # Metrics data API
โ โ โโโ pricing/ # Crypto pricing API
โ โ โโโ model/chat/ # Chat history API
โ โโโ page.tsx # Main dashboard
โ โโโ globals.css
โโโ components/
โ โโโ ui/ # shadcn/ui components
โ โโโ metrics-chart.tsx # Account value chart
โ โโโ models-view.tsx # Trade & chat history
โ โโโ crypto-card.tsx # Price display cards
โโโ lib/
โ โโโ ai/
โ โ โโโ agent/ # AI agent logic
โ โ โโโ model.ts # Model configurations
โ โ โโโ prompt.ts # Trading prompts
โ โ โโโ tool.ts # AI tools/functions
โ โโโ trading/
โ โ โโโ buy.ts # Buy execution
โ โ โโโ sell.ts # Sell execution
โ โ โโโ current-market-state.ts
โ โ โโโ account-information-and-performance.ts
โ โโโ types/ # TypeScript types
โโโ prisma/
โโโ schema.prisma # Database schema
๐ฎ How It Works
- Data Collection: Every 20 seconds, the system collects account metrics (balance, positions, PnL)
- AI Decision Making: Every 3 minutes, the AI analyzes market data and makes trading decisions
- Execution: Approved trades are executed via Binance API
- Transparency: All reasoning, prompts, and decisions are stored in the database
- Visualization: The dashboard displays real-time performance and trade history
โ๏ธ Configuration
Starting Capital (START_MONEY)
- Set your initial trading capital in USDT (Tether stablecoin)
- Example:
START_MONEY=10000means you start with $10,000 USDT - Recommended for testing: Start with small amounts (e.g.,
START_MONEY=30) - The AI will make trading decisions based on this available capital
- All profits and losses are calculated relative to this starting amount
๐ค AI Models
Currently supported:
- DeepSeek V3 Chat - Primary trading model
- DeepSeek R1 - Advanced reasoning model (optional)
Want to add more models? Check out the AI SDK providers and add them to lib/ai/model.ts!
๐ Dashboard Features
- Live Crypto Prices: Real-time prices for BTC, ETH, SOL, BNB, DOGE
- Account Performance Chart: Interactive chart showing total account value over time
- Completed Trades: Detailed history of all buy/sell operations
- Model Chat: Full transparency into AI's chain-of-thought and decision-making
- Positions: Current open positions (coming soon)
โ ๏ธ Disclaimer
This is educational/research software. Trading cryptocurrencies involves substantial risk of loss.
- Start with small amounts or paper trading
- The AI model may make poor decisions
- Past performance doesn't guarantee future results
- You are responsible for any financial losses
- Review and test thoroughly before using real money
๐ค Why Open Source?
The original nof1.ai Alpha Arena is a closed competition. This open-source version aims to:
- Democratize AI trading research - Anyone can experiment with AI trading agents
- Educational purposes - Learn how AI agents make financial decisions
- Transparency - Full visibility into prompts, reasoning, and execution
- Community innovation - Improve and iterate on trading strategies together
๐ License
MIT License - See LICENSE file for details
๐ Acknowledgments
- Inspired by nof1.ai's Alpha Arena
- Built with shadcn/ui components
- Powered by DeepSeek AI models
- Trading via CCXT
๐ Links
โก Built with Bun + Next.js 15 + DeepSeek + CCXT
Markets are the ultimate test of intelligence. Let's find out if LLMs are good enough.
Jelajahi proyek terkait
Memuatโฆ