AlgoTrade Dashboard — แสดง Portfolio Equity, Open Positions, P&L History และ Auto-Trade Engine แบบ Real-time
AlgoTrade เป็น Full-Stack Algorithmic Trading Dashboard สำหรับ Paper/Live Trading บน Alpaca Markets API
- Auto-Trader — รัน strategy engine ทุก 1 นาทีผ่าน Vercel Cron Jobs (ไม่ต้องมี server แยก)
- 4 Strategies — Momentum, Mean Reversion, Stat-Arb, Pairs Trading
- Crypto 24/7 — BTC, ETH, SOL, AVAX, DOGE trade ได้ตลอดเวลา
- Risk Management — Portfolio heat limit, daily P&L cutoff, stale order cleanup
- Real-time Dashboard — Portfolio equity chart, P&L history, open positions
- Telegram Alerts — แจ้งเตือนทุก signal และ trade execution
Note: Vercel Hobby = daily cron max. For hourly trading, use Cron-job.org (free) to call
GET /api/cron/ai-tradeevery hour with headerAuthorization: Bearer {CRON_SECRET}
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TypeScript, Tailwind CSS v4, Recharts |
| Backend | Next.js API Routes (Serverless) |
| Scheduling | Vercel Cron Jobs (every 1 min) |
| Broker | Alpaca Markets API (Paper + Live) |
| Database | Neon PostgreSQL (production) / SQLite (local) |
| Hosting | Vercel (Free tier) |
| Notifications | Telegram Bot API |
git clone https://github.com/watcharaponthod-code/trading.git
cd trading
npm install# Alpaca
ALPACA_API_KEY=your_key
ALPACA_API_SECRET=your_secret
ALPACA_BASE_URL=https://paper-api.alpaca.markets
# Database (Neon)
DATABASE_URL=postgresql://...
# Cron Security
CRON_SECRET=your_random_secret
# Telegram (optional)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_ADMIN_CHAT_IDS=123456789vercel deploy --prodVercel Cron Jobs จะรันอัตโนมัติทุก 1 นาทีหลัง deploy
