GitHub - rkang30/open-trade-bot: Free, open-source Next.js starter for a stock trading bot — wired to the Picckles Signals API, ships in paper-trading mode. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search/
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
rkang30
open-trade-bot
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>2 Commits<br>2 Commits
public
public
src
src
.env.example
.env.example
.gitignore
.gitignore
AGENTS.md
AGENTS.md
CLAUDE.md
CLAUDE.md
LICENSE
LICENSE
README.md
README.md
eslint.config.mjs
eslint.config.mjs
next.config.ts
next.config.ts
package-lock.json
package-lock.json
package.json
package.json
postcss.config.mjs
postcss.config.mjs
tsconfig.json
tsconfig.json
vercel.json
vercel.json
View all files
Repository files navigation
open-trade-bot
A minimal, open-source trading bot built on the Picckles Signals API — a read-only REST API for stock trading signals. Next.js (App Router) + TypeScript, deployable to Vercel with a daily cron.
Free to try, no scraping, no backtesting your own strategy required: the API tells you what to buy and when to sell, this bot wires that into a runnable loop with a live dashboard. Ships in paper-trading mode so you can see it work with zero broker setup — one function (placeOrder, in src/lib/bot.ts) to swap in for real orders.
What it does
Each tick (GET /api/run, hit by Vercel Cron or your own scheduler):
Checks the API for SELL/HOLD decisions on any position it's currently holding, and paper-sells the SELLs.
Checks the API for today's BUY signals, sized to your per-trade budget, and paper-buys anything new.
Persists positions and a trade ledger to Upstash Redis.
The dashboard (/) shows open positions and recent trades, and has a Run now button to trigger a tick manually — handy for trying it out without waiting for the cron.
Quickstart
cd open-trade-bot<br>npm install
cp .env.example .env.local<br># - get a free API key: https://picckles.com/api-pricing<br># - get a free Upstash Redis (needed for positions to persist): https://upstash.com
npm run dev">git clone this-repo><br>cd open-trade-bot<br>npm install
cp .env.example .env.local<br># - get a free API key: https://picckles.com/api-pricing<br># - get a free Upstash Redis (needed for positions to persist): https://upstash.com
npm run dev
Open localhost:3000, click Run now .
Deploying
Push to GitHub, import into Vercel.
Add the env vars from .env.example in the Vercel project settings (PICCKLES_API_KEY, UPSTASH_REDIS_REST_URL/_TOKEN, and a random CRON_SECRET).
vercel.json already schedules /api/run for 21:05 UTC on weekdays (shortly after the US close) — adjust the cron expression if you want a different time.
Strategies
Set STRATEGY in your env to either:
Strategy<br>Style<br>Typical hold
double7-guarded (default)<br>Buy a strong uptrend on a short-term low, VIX crash gate<br>~2–3 weeks
rs-pullback<br>Buy a relative-strength leader on a fast capitulation dip<br>~2–5 days
Full entry/exit rules: picckles.com/api-docs#strategies.
Going live
Everything routes through runTick() in src/lib/bot.ts, which currently only calls logTrade() (paper). Add a real broker call (Alpaca, Interactive Brokers, etc.) alongside it and the rest of the bot — signal fetching, exit checks, position tracking — is unchanged.
Disclaimer
Signals are informational only and identical for every API subscriber — not personalized investment advice. This bot trades paper money by default; you are responsible for anything you connect to a real broker.
About<br>Free, open-source Next.js starter for a stock trading bot — wired to the Picckles Signals API, ships in paper-trading mode.<br>picckles.com<br>Topics<br>algotradingnextjsopen-sourcestock-apitrading-bot-monitoringtypescript<br>Resources<br>Readme<br>MIT license<br>Activity<br>Stars<br>0 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.