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