open-trade-bot is a free, open-source Next.js starter designed for stock trading bots. It integrates seamlessly with the Picckles Signals API and operates in paper-trading mode, allowing users to experiment and refine their strategies without real money. The focus is on engineering aspects such as scheduling and persistence, simplifying the path from development to deployment.
This project offers a free, open-source Next.js starter for a stock trading bot that is seamlessly integrated with the Picckles Signals API. It operates in paper-trading mode, allowing users to simulate trading strategies without the need for a broker setup.
The primary focus of this starter kit is to simplify the process of building a trading bot by treating the trading strategy as an external input, specifically utilizing the Picckles Signals API which delivers daily buy and sell signals. This repository bypasses the typical complexities associated with setting up trading algorithms, allowing users to concentrate on key engineering aspects such as scheduling, persistence, and deployment.
The bot schedules operations with a daily cron setup, executing trades and maintaining records automatically. Users can manually trigger trades via a user-friendly dashboard.
Paper Trading Mode: Operates without any real broker configuration, enabling users to observe its execution before going live. Transitioning to real trading only requires modifying one function in the code.
Architecture: The bot employs a Cron job that triggers an API at specific times to run trading ticks, handling buy/sell operations based on positions and budget constraints. The architecture is simple:
Vercel Cron (weekdays, 21:05 UTC)
│
▼
GET /api/run ──► runTick(strategy)
│
├─► picckles.ts Fetch SELL/HOLD and BUY signals
├─► bot.ts Manage trading logic and budget
└─► store.ts Store trade history in Upstash Redis
Strategies: Users can choose between different trading strategies. Examples include:
double7-guarded: Focuses on buying strongly trending stocks at short-term lows, incorporating a VIX crash gate.rs-pullback: Targets relative strength leaders during significant pullbacks.To get started:
git clone https://github.com/rkang30/open-trade-bot
cd open-trade-bot
npm install
cp .env.example .env.local
# Configure your Picckles API key and Upstash Redis credentials
npm run dev
Navigate to localhost:3000 to access the dashboard and manually initiate trades.
For a comprehensive guide on how to build a stock trading bot using this repository, see the step-by-step tutorial: How to Build a Stock Trading Bot with Next.js and a Trading Signals API.
Signals from the API are generic and not personalized, thus serving primarily as informational resources. The bot is designed for paper trading by default, and users are accountable for any actions taken with a connected real trading account. Adjustments for live trading can be made within the bot's logic.
No comments yet.
Sign in to be the first to comment.