Welcome to the Trading Bot!
This application simulates a basic trading bot for a hypothetical stock market, designed to help you understand stock trading mechanics and automated trading strategies.
- Continuous Monitoring: Keeps an eye on stock price changes using mock data.
- Automated Trading: Executes trades based on predefined rules and strategies.
- Profit/Loss Tracking: Monitors and reports the bot’s performance, including a summary of trades made.
Follow these steps to get your trading bot up and running:
- Clone the repository.
- Navigate to the project directory.
- Install dependencies with
npm install
axios: For making API calls.
dotenv: For managing environment variables. - Run the application using
node src/index.js.
trading-bot/
│
├── src/
│ ├── api/
│ │ └── mockApi.js # Mock API for stock prices
│ ├── services/
│ │ └── tradingService.js # Trading logic and strategies
│ ├── models/
│ │ └── tradeModel.js # Trade and profit/loss tracking
│ ├── index.js # Entry point of the application
│ └── utils/
│ └── logger.js # Logging utility
│
├── .env # Environment variables
├── package.json # Project metadata
└── README.md # Documentation
The trading strategies employed by the bot are as follows:
Buy Condition: The bot buys stocks when the price drops by 2%.
Sell Condition: The bot sells stocks when the price rises by 3%.
This project was created by Ravikant Singh. Contributions via issues or pull requests are welcome!