尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A rule-based trading bot that paper-trades US stocks and crypto on Alpaca's paper account using real market data, with a public read-only dashboard for history, positions, and analytics.
POST /api/tick runs one cycle. cron-job.org calls it every 15 minutes, 24/7 (GitHub Actions is a backup): crypto trades every tick, stocks only during market hours. The Sorties page shows which scheduler started each run.paper-api.alpaca.markets.lib/engine.ts)bot_runs row. Skip if another run is still in flight.lib/risk.ts).
{strategy}.{side}.{symbol}.{barTime}. That makes retries idempotent and attributes every fill to a strategy.BTCUSD in positions and fills but BTC/USD in orders; everything is stored as BTC/USD.lib/strategies/)| Strategy | Symbols | Entry | Exit |
|---|---|---|---|
rsi_revert | SPY QQQ AAPL MSFT | RSI(14) < 30 | RSI > 55, or the 5% stop |
sma_cross | NVDA AMZN META TSLA AMD | SMA20 crosses above SMA50 (within 3 bars) | SMA20 < SMA50, or the 5% stop |
sma_cross | BTC/USD ETH/USD | same | same |
rsi_revert | SOL/USD | same | same |
Universe, parameters, and risk limits live in lib/config.ts. To add a strategy, implement the Strategy interface and register it in lib/strategies/index.ts.
Risk limits
Crypto trades pay Alpaca's trading fee. Fees are synced from the account's CFEE activities and shown next to realized P&L; round-trip P&L itself is before fees.
npm i -g vercel && vercel login
vercel link
vercel integration add neon # provisions DATABASE_URL
vercel env add ALPACA_KEY_ID
vercel env add ALPACA_SECRET_KEY
vercel env add CRON_SECRET # openssl rand -hex 32
vercel env add ADMIN_SECRET # openssl rand -hex 32
vercel env pull .env.local
npm run db:migrate
vercel git connect. Every push to main then deploys to production. Use vercel deploy --prod for a one-off manual deploy.https://<your-app>/api/tick every 15 minutes with header Authorization: Bearer <CRON_SECRET>. Runs it starts show as cron-job.org in Sorties.TICK_URL (https://<your-app>/api/tick) and CRON_SECRET. The 24/7 schedule uses about 2,900 Actions minutes a month: free on a public repo, over the 2,000-minute free tier on a private one. A weekly keep-alive job re-enables the workflow so GitHub's 60-day inactivity shutoff never triggers.npm run dev
# Dry run: evaluates strategies even when the market is closed, never places orders
curl -X POST -H "Authorization: Bearer $CRON_SECRET" "localhost:3000/api/tick?dryRun=1"
npm test
The Runs page has an admin panel (needs ADMIN_SECRET) with: dry run, run a tick now, pause/resume, and liquidate all.