Stock Go is a C++ and Java based CLI-Based application for buying and selling stocks. Integrated with the Google Web Scraper API's, it ensures the persistency of the Realtime stock data is available to the users.
- User registration and authentication through Firebase
- Wallet management (add/remove funds)
- Stock buying and selling
- Portfolio management
- Watchlist functionality
- Transaction history tracking
- Company fundamentals analysis
- Latest news and trends around the stock Market
- Experts predictions based on the Stcok Performance and the company fundamentals.
- C++ Compiler (e.g., g++)
- Java Development Kit (JDK 8 or higher)
- openssl Library
- curl Library (c++)
- nlohmann/json library for JSON manipulation
- JNI for interfacing Java and C++
git clone https://github.com/username/stock-trading-system.git](https://github.com/GarvRajput17/StockTrading/garv)- Ensure you have the JDK installed and configured in your system's PATH.
- Ensure that JNI is set up and include Path for the IDE is updated for the project to build.
- Ensure that openssl / curl / nlohmann-json have been installed and include path have been setup correctly.
-
Setting up firebase account is cruicial for the porject to run.
-
Install the firebase cli tools using the command:
For Mac Users:
brew install firebase cli
For Windows Users:
npm install -g firebase-tools
-
Login into your firebase account and initialise it using the command:
firebase init
-
Ensure to configure the firebase.json / firestore database indexes/ database.rules.json/ firestore.indexes.json/ fierestore.rules
-
Then create a firebase_config.h file in the Firebase_files folder and configure it as given below:
#ifndef FIREBASE_CONFIG_H #define FIREBASE_CONFIG_H #define FIREBASE_API_KEY "" #define FIREBASE_PROJECT_ID "" /* const char* FIREBASE_CONFIG = R"({ "projectId": "", "appId": "", "databaseURL": "", "storageBucket": "", "apiKey": "", "authDomain": "", "messagingSenderId": "", "measurementId": "" })";
*/ #endif
Ensure to fill the given details from tyour firebase console.
java -cp .:lib/json-20240303.jar Main- Create a MAKEFILE for configuring the java file (Main.java)
- Build the program using the command "make".
- Run the pogram using the command "make run".
- Choose the registration option and provide a username and password.
- Log in using your credentials after registering.
- Select the option to add funds and choose a payment method.
- Enter the stock symbol and quantity you wish to purchase.
- Provide the stock symbol and quantity to sell from your portfolio.
- Check your current stock holdings and their total value.
- View a list of all transactions made, including date, amount, and type.
Testing was done for checking the persistence by logging in the same user on two different terminals at the same time and check if the data is accessed only once at a time. Database was tested heavily by performing CRUD operations on a same set of data points from multiple terminals at the same time.