Blackbox is a TypeScript-based trading bot designed primarily for Futures and Options (FnO) trading. It is extensible to other trading platforms, but currently, it is compatible with the Zerodha platform. The bot allows you to implement various trading strategies for automated trading. Please note that this repository is a work in progress, and most features are pending completion.
-
Order Manager
- Manage pending orders.
- Retry orders with modification.
- Cancel orders.
- Blacklist orders for a specific duration.
-
App
- Check time and start/stop trading according to market hours.
-
Prisma
- Pick stocks only from a specific strategy.
- TypeScript
- Node.js
- Prisma
To set up the Blackbox trading bot, follow these steps:
- Clone this repository to your local machine.
git clone https://github.com/yourusername/blackbox.git
- Navigate to the project directory.
cd blackbox
- Install the required dependencies.
npm install
- Generate Prisma client code.
npm run g
Here are some useful scripts that you can use:
-
Lint and Fix Code
npm run lint:fix
-
Format Code
npm run pretty
-
Start the Trading Bot
npm start
-
Build the Project
npm run build
-
Prisma Database Migrations
-
Apply migrations without generating Prisma client code:
npm run m
-
Generate Prisma client code:
npm run g
-
Open Prisma Studio for database exploration:
npm run s
-
Contributions to this project are welcome! Feel free to open issues or submit pull requests to help improve the trading bot.
This project is licensed under the MIT License.
Please make sure to update this README with additional information as the project evolves and more features are implemented. Include any setup instructions, configuration details, and usage examples that may be relevant to potential users and contributors.