MicroAI Paygate
An x402-style payment gateway for AI requests. Sign EIP-712, get a signed receipt, verify the signature client-side.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A modern stock analysis platform featuring interactive candlestick charts with put/call level indicators and 5-quadrant visualization for identifying trading opportunities.
This README gives an overview. CLAUDE.md is the maintained architecture guide (data sources, crons, gating), and docs/CHANGES.md records every change with what was and wasn't verified.
public.eod_usmkts_price tablegit clone <your-repo-url>
cd neon_trade
npm install
cp .env.example .env.local
Edit .env.local with your credentials:
# Neon Database
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# Alpaca API (for market data - OHLC, quotes, trades)
ALPACA_API_KEY=your_alpaca_api_key
ALPACA_SECRET_KEY=your_alpaca_secret_key
ALPACA_BASE_URL=https://data.alpaca.markets
npm run dev
neon_trade/
├── app/ # Next.js app router
│ ├── api/ # API routes (stocks, watchlists, earnings, oi-tracker, prefs, cron, admin, ...)
│ ├── stock/[symbol]/ # Stock detail page
│ ├── quadrant/ # Quadrant analysis page
│ ├── watchlists/ # Watchlists and the chart + list split view
│ ├── scan-alerts/ # Latest and historical scan alerts
│ ├── performance/ # How alerts played out by expiry
│ ├── earnings/ # Earnings tracker (Pro)
│ ├── oi-tracker/ # Options OI tracker (Pro)
│ ├── admin/, profile/, upgrade/, login/, guide/, diagnostics/
│ └── page.tsx # Home page
├── components/ # React components
│ ├── charts/ # Chart component with sanitization
│ ├── alpaca.ts # Alpacacomponents
│ └── ui/ # UI components
├── lib/ # Utilities and services
│ ├── db.ts # Database client
│ ├── tradier.ts # Tradier API client
│ ├── calculations.ts # Level calculations
│ └── utils.ts # Helper functions
├── types/ # TypeScript types
├── scripts/ # One-off DDL (bootstrap-*.mjs), backfills and fixture tests
├── docs/ # CHANGES.md (running change log), earnings.md, oi-tracker.md
├── CLAUDE.md # Working rules and an up-to-date architecture guide
└── PROJECT_MASTER_PLAN.md # Original project plan (predates the current code)
GET /api/stocks/search?q={query} - Search stocksGET /api/stocks/{symbol} - Get stock details with latest levelsGET /api/stocks/{symbol}/ohlc?from={date}&to={date} - Get OHLC data from AlpacaGET /api/stocks/{symbol}/levels?expiry={date}&range=true - Get levels with historical dataGET /api/stocks/{symbol}/expiry-dates - Get available expiry datesGET /api/quadrant/data - Get all stocks for quadrant chartGET /api/test-alpaca - Test Alpaca API connectionSigned-in routes (each checks the feature for the user's plan):
/api/watchlists/* - watchlists, items, quotes, levels, alerts, performance/api/scan-alerts/* - latest, historical and recent alerts/api/earnings/* - earnings list and levels/api/oi-tracker/* - meta, screen, strategies, per-stock OI, tracked positions (private to the user)/api/prefs/[key] - the user's saved UI preferences (table columns)/api/cron/* - protected jobs run by Railway (market catalog + option volume capture, earnings, Telegram alerts)For each stock, we calculate 5 levels based on the formula:
Level Value = (CLOSE - LEVEL_PRICE) / CLOSE
The level with the value closest to 0 is the "closest level" - indicating the price is near that level.
Level Types:
put_LOW - Lowest put support levelput_INT - Intermediate put supportcomb_INT - Combined put/call level (critical zone)call_INT - Intermediate call resistancecall_HIGH - Highest call resistance levelRequired table: public.eod_usmkts_price
Key columns:
symbol - Stock ticker symboltrade_date - Trading dateexpiry_date - Option expiry dateclose - Closing priceput_low, put_int, comb_int, call_int, call_high - Level pricesput_oi, call_oi - Open interest valuesOI_DIFF = put_oi - call_oiOther tables:
public.us_opt_chg_rpt - the daily options OI change report (per contract; no volume column)public.securities - name, sector, industry, market cap, indicesnt_-prefixed because the database is shared with another app: plans, user profiles, watchlists, earnings, the market date catalog, nt_opt_daily_bars (option volume), nt_oi_tracked, nt_user_prefs, ...scripts/bootstrap-*.mjs (run with node --env-file=.env.local scripts/<name>.mjs); docs/oi-tracker.md and docs/earnings.md list the ones each feature needs.eod_usmkts_price is stored as zeros, not null; see CLAUDE.md.See PROJECT_MASTER_PLAN.md for the original schema notes (they predate the current tables) and CLAUDE.md for the current architecture.
All numeric values from the database are sanitized to prevent NaN/NULL errors:
COALESCE(column, 0) in SQL queriesMap<date, {levels, closestLevel}> for date-specific tooltips/v2/stocks/bars endpoint with symbols parameter# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lint
This project is optimized for Vercel:
MIT
For detailed documentation, see PROJECT_MASTER_PLAN.md