Watch the project demo on YouTube
BharatTrade is a simple command-line stock trading simulator implemented in C and Python. It allows users to perform basic actions such as adding money, investing, withdrawing, and viewing account balance. Additionally, users can view real-time stock data for a given stock symbol.
- Add Money: Users can add money to their account balance.
- Invest Money: Users can invest a specified amount in a stock.
- Withdraw Money: Users can withdraw money from their account balance.
- View Balance: Users can view their current account balance.
- View Stock Data: Users can view real-time stock data for a given stock symbol. Ensure Python and the necessary libraries (
yfinance
) are installed to run the Python script.
- Compile the C program
BharatTrade_main.c
using a C compiler. - Run the compiled executable.
- Follow the on-screen instructions to navigate through the menu and perform actions.
The project also includes file handling functionalities:
- Stock Data Storage: Stock data retrieved from the Python script can be stored in external files for future reference or analysis.
- Account Information: Account information, such as balance and transaction history, can be stored in files to maintain user data across sessions.
Ensure appropriate permissions and file paths are set to enable file handling functionalities.
The Python script stock_data.py
retrieves real-time stock data for a given stock symbol using the yfinance
library. Users can input a stock symbol, and the script will display information such as the current price, change, and percent change in the stock price.
- Ensure Python is installed on your system.
- Install the required Python library
yfinance
using pip:
pip install yfinance
- Run the Python script:
python stock_data.py
- Follow the on-screen instructions to input a stock symbol and view the stock data.
BharatTrade is a project developed for educational purposes and should not be used for actual stock trading. The stock data provided in this project may not be accurate and is for demonstration purposes only.